LOW · CVSS 4.0 EPSS 0.5% · 42th percentile CWE-200CWE-532

CVE-2026-123372: compose-lint: A pull request can make compose-lint quote a secret from a CI-generated `.env` into its findings

Published 2026-11-10 · Updated 2026-11-10 · Also known as GHSA-jf3h-8jvx-vcrg

Summary

A vulnerability in compose-lint allows an untrusted pull request to leak secrets from a CI-generated .env file into findings, logs, and SARIF artifacts. Maintainers and security engineers using compose-lint versions 0.22.0 through 0.31.0 should act.

Who is affected

Affected deployments include those using compose-lint or the composelint/compose-lint Docker image between versions 0.22.0 and 0.31.0 where secrets are written into a sibling .env file. The issue is exposed under specific conditions such as workflows using pull_request_target, pull requests from branches in the same repository, or self-hosted runners that retain a populated .env file. When triggered, the resolved secret value is quoted directly into rule findings, JSON output, and uploaded SARIF artifacts.

Exploitability

The vulnerability requires network access and low privileges, with a passive attack requirement and user interaction needed. The confidentiality impact is low, while integrity and availability are unaffected, resulting in a low severity rating with an EPSS score of 0.004 and no CISA KEV listing.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
GitHub Actions tmatens/compose-lint >= 0.22.0, < 0.32.0 0.32.0 uses: tmatens/[email protected]
PyPI compose-lint >= 0.22.0, < 0.32.0 0.32.0 python -m pip install 'compose-lint>=0.32.0'

CVSS 4.0 vector

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Attack vectorNetwork
Attack complexityLow
Attack requirementsPresent
Privileges requiredNone
User interactionPassive
Confidentiality (vulnerable system)Low
Integrity (vulnerable system)None
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)None
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

Which versions of compose-lint are affected?

Versions 0.22.0 through 0.31.0 for PyPI, GitHub Actions, and the Docker image are affected.

How do secrets get exposed by compose-lint?

compose-lint resolves `${VAR}` references from a sibling .env file into image values and subsequently quotes the resolved value in findings and fix text.

Does standard pull request testing from forks expose this vulnerability?

No, pull requests from forks normally run without secrets, meaning the common setup is not typically exposed.

Original advisory description
### 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 `.env` beside 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

Source records: GHSA-jf3h-8jvx-vcrg (OSV.dev) · EPSS by FIRST, 2026-11-22.