CVE-2026-123372: compose-lint: A pull request can make compose-lint quote a secret from a CI-generated `.env` into its findings
Impact Since 0.22.0, compose-lint fills in ${VAR} references from the .env beside the Compose file, as Compose does. The documentation says values under environment: are never resolved from a .env, "that is where secrets live". But image: values are resolved, and CL-0004 and CL-0019 quote the resolved image in their message and fix text. Some CI workflows write secrets into that .env before linting or building.
Published Nov 10, 2026
Affected packages
compose-lint
- Ecosystem
- PyPI
- Affected
- >= 0.22.0, <= 0.31.0
- Fixed in
- 0.32.0
- Check
pip show compose-lint
tmatens/compose-lint
- Ecosystem
- GitHub Actions
- Affected
- >= 0.22.0, <= 0.31.0
- Fixed in
- 0.32.0
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
Since 0.22.0, compose-lint fills in ${VAR} references from the .env beside the Compose file, as Compose does. The documentation says values under environment: are never resolved from a .env, "that is where secrets live". But image: values are resolved, and CL-0004 and CL-0019 quote the resolved image in their message and fix text.
Some CI workflows write secrets into that .env before linting or building. In such a workflow, a pull request that changes one line to image: "${DB_PASSWORD}", or image: "nginx:${DB_PASSWORD}", gets the secret's value quoted in a finding. The finding reaches the job log, JSON output, and the SARIF uploaded to Code Scanning. GitHub masks registered secrets in the job log, but not in uploaded JSON or SARIF artifacts or in Code Scanning alert text. The pass/fail result is not affected.
This needs a workflow that writes secrets into the .env beside the Compose file *and* runs on pull requests from authors who should not see them. Pull requests from forks normally run without secrets, so the common setup is not exposed, which is why this is scored as low confidentiality impact. Where the conditions hold, such as a pull_request_target workflow, pull requests from branches in the same repository, or a self-hosted runner that keeps a populated .env in the checkout, the whole value is disclosed.
Found during an internal pre-1.0 security review.
GitHub Action. Action tags v0.22.0 through v0.31.0 install their own compose-lint version and are affected. Earlier tags install the newest release unless version: is set, and so currently install an affected one.
Docker image. composelint/compose-lint tags 0.22.0 through 0.31.0, the matching minor tags, and latest are affected when the .env is mounted with the project.
Patches
Fixed in 0.32.0. Rules still grade the value the sibling .env substituted, but findings, fix guidance and notes quote the ${NAME} reference in its place, in text, JSON and SARIF. A value shorter than 8 characters is shown as written, because short values are also words the guidance itself uses; docs/what-a-run-reads.md states this limit.
Workarounds
- Upgrade to 0.32.0 or later.
- Run with
--no-env, which skips the sibling.env. - Don't write secrets into the
.envbeside the Compose file in a job that lints untrusted pull requests.
Reproduction
project/.env DB_PASSWORD=example-secret (written by CI, not committed)
project/compose.yml services: {web: {image: "${DB_PASSWORD}"}}compose-lint --format sarif compose.yml reports CL-0004 with the message Image 'example-secret' has no tag, ....
References
- https://github.com/tmatens/compose-lint/security/advisories/GHSA-jf3h-8jvx-vcrg
- https://nvd.nist.gov/vuln/detail/CVE-2026-123372
- https://github.com/tmatens/compose-lint/pull/944
- https://github.com/tmatens/compose-lint/commit/977da9724789264c2662afe47f79220e915442c2
- https://github.com/tmatens/compose-lint/releases/tag/v0.32.0
- https://github.com/advisories/GHSA-jf3h-8jvx-vcrg
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-123368
compose-lint: .env read through a symlink outside the project can expose the CI job's environment
low3.1Nov 10, 2026CVE-2026-123369
compose-lint: Compose file text can issue GitHub Actions workflow commands through the compose-lint Action
medium4.3Nov 10, 2026CVE-2026-123370
compose-lint: `fix --apply` can delete a line the user did not select, including a security setting
medium5.1Nov 10, 2026CVE-2026-123371
compose-lint: A `.compose-lint.yml` symlinked outside the project is read, and a parse error quotes part of the target
low2.3Nov 10, 2026CVE-2026-123373
compose-lint: A committed symlink makes compose-lint quote a file from outside the project into its output
low2.3Nov 10, 2026CVE-2026-123796
compose-lint: Incomplete fix for GHSA-jf3h-8jvx-vcrg: a run stopped at the finding limit quotes a secret from a CI-generated `.env`
low2.3Nov 10, 2026
