CVE-2026-123370 — tmatens compose-lint
One of 7 tmatens compose-lint vulnerabilities published together by NVD: our article covers all of them.
DockerCloud & containersVulnerabilitiesAnalysis
compose-lint CVE-2026-123370: fix --apply can delete unrelated lines in Compose files
CVE-2026-123370 is a medium-severity (CVSS 5.1) flaw in the tmatens compose-lint Docker Compose linter. Its YAML parser and its position conversion disagree on line breaks, so fix --apply can silently delete a line after the intended edit. Upgrade to 0.18.0, which the NVD entry says fixes the issue.
Key points
- CVE-2026-123370 affects tmatens compose-lint from 0.9.0 until 0.18.0; the fix is in 0.18.0.
- The parser and fix-position logic disagree on line breaks, so fix --apply can delete the line after an edit.
- Deleted lines can include unrelated network or security settings, and the resulting file can still pass validation.
- NVD rates the issue MEDIUM (CVSS 5.1). The sources do not report active exploitation.
What's affected
The NVD entry describes CVE-2026-123370 in tmatens compose-lint, a linter that checks Docker Compose files for dangerous misconfigurations before deployment. The flaw is present from version 0.9.0 until 0.18.0, and the fix is in 0.18.0. The source does not list other affected products or any additional version details.
What the flaw is
The YAML parser treats lone carriage returns and the Unicode line separators U+0085, U+2028 and U+2029 as line breaks. The fix-position logic counts only ordinary newline characters. Because of this mismatch, when a value contains one of these separators, the position offsets used by fix --apply drift. According to the NVD description, each later edit shifts, and the line after the selected target can be deleted. That line may be an unselected network or other security setting.
How serious is it
NVD rates the issue MEDIUM with a CVSS score of 5.1. The main risk is integrity: a security-relevant setting can be removed without the operator choosing it. The NVD entry notes that the resulting file can still be valid YAML, that post-edit checks can pass, and that the command can report success. The extra deletion appears only in the dry-run diff. Anyone who applies the fix without reading that diff may not notice it.
Is it being exploited?
The sources do not say whether this issue has been exploited in the wild, and no exploitation information has been published in them. The scenario in the NVD description involves a pull request that places the special character in a quoted value, so repositories that accept outside contributions and run automated fixes are the most exposed.
What to do
Upgrade compose-lint to 0.18.0 or later. Until you can upgrade, do not apply automated fixes without first reviewing the full dry-run diff for removed lines that you did not expect. For pipelines that run fix --apply on pull requests, compare the Compose file before and after the change, and treat any unexpected removal of a security setting as a failure. Review Compose files from untrusted contributions by hand.
Recommended actions
- Upgrade compose-lint to version 0.18.0 or later.
- Until patched, read the full dry-run diff before running fix --apply and reject any unexpected removed lines.
- In CI, compare Compose files before and after automated fixes, especially for pull requests from untrusted contributors.
- Review security-relevant settings in Compose files after automated changes, since the tool may report success anyway.
Summary
compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. From 0.9.0 until 0.18.0, compose-lint's YAML parser recognizes lone carriage returns and Unicode line separators U+0085, U+2028, and U+2029 as line breaks while fix position conversion counts only newline characters. A pull request can place one of these separators in a quoted value so fix --apply shifts each later edit and deletes the line after the selected target, including an unselected network or other security setting. The resulting Compose file can remain valid, post-edit checks can pass, and the command can report a successful fix even though the dry-run diff was the only place showing the extra deletion. This issue is fixed in version 0.18.0.
Severity breakdown
Medium · 5.1
An attacker without an account can exploit this over the network if a user is tricked into an action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- none
- Login needed
- no
- User action needed
- yes, a user must deliberately do something
- Impact
- low on integrity, none on confidentiality and availability
- Impact on other systems
- low on integrity, none on confidentiality and availability
Weakness
- CWE-193: Off-by-one Error
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| compose-lint (PyPI) | ≥ 0.9.0, ≤ 0.17.0 | 0.18.0 |
| tmatens compose-lint | >= 0.9.0, < 0.18.0 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/tmatens/compose-lint/commit/c9d453a6a69c076788fe1db05cb54684…
- github.com/tmatens/compose-lint/commit/cbbf886d91347dea9c51b584eb50088e…
- github.com/tmatens/compose-lint/pull/547
- github.com/tmatens/compose-lint/pull/549
- github.com/tmatens/compose-lint/releases/tag/v0.18.0
Other references
Affected
- tmatens compose-lint
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-123370?
CVE-2026-123370 is a medium-severity (CVSS 5.1) flaw in the tmatens compose-lint Docker Compose linter. Its YAML parser and its position conversion disagree on line breaks, so fix --apply can silently delete a line after the intended edit. Upgrade to 0.18.0, which the NVD entry says fixes the issue. Weakness type: Off-by-one Error (CWE-193).
How severe is CVE-2026-123370?
CVE-2026-123370 has a CVSS 4.0 base score of 5.1 (medium), from the CNA (github.com). An attacker without an account can exploit this over the network if a user is tricked into an action.
Is CVE-2026-123370 being exploited?
Not as far as is known: CVE-2026-123370 is not in CISA's Known Exploited Vulnerabilities catalog as of November 29, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-123370?
compose-lint (PyPI) ≥ 0.9.0, ≤ 0.17.0 (fixed in 0.18.0); tmatens compose-lint >= 0.9.0, < 0.18.0.
How do I fix CVE-2026-123370?
Upgrade compose-lint to version 0.18.0 or later. Until patched, read the full dry-run diff before running fix --apply and reject any unexpected removed lines. In CI, compare Compose files before and after automated fixes, especially for pull requests from untrusted contributors.