# CVE-2026-123368: compose-lint: .env read through a symlink outside the project can expose the CI job's environment

- **Severity:** LOW 2.3
- **CVSS:** 2.3 (v4.0, GitHub) `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Passive; Confidentiality impact: Low; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.70% (percentile 49, 2026-11-29)
- **CWE:** CWE-22, CWE-59
- **Aliases:** GHSA-6wcv-rj3c-mhv3
- **Published:** 2026-11-10T15:56:56.000Z
- **Modified:** 2026-11-10T15:57:15.000Z

## Who should check

- Projects that depend on PyPI package compose-lint (\>= 0.22.0, \<= 0.30.0)
- Projects that depend on GitHub Actions package tmatens/compose-lint (\>= 0.22.0, \<= 0.30.0)

## Description

\#\#\# Impact

compose-lint fills in \`${VAR}\` references from the \`.env\` file next to the Compose file. It is meant to read nothing outside the project directory, and \`env\_file:\`, \`include:\` and \`extends:\` paths are checked for that. The \`.env\` read is not. If \`.env\` is a symlink, compose-lint follows it wherever it points.

A pull request can add a \`.env\` symlink to any file on the CI runner and a Compose file that references a variable from it. compose-lint substitutes the value and quotes it in finding messages, which go to the log and to JSON and SARIF output.

The worst target is \`/proc/self/environ\`, the linter's own environment. The Compose file only needs to reference the name of the first variable in it: because that file separates variables with NUL bytes rather than newlines, the substituted value is the entire rest of the environment. On a CI runner that environment holds whatever the workflow put there, including secrets. GitHub masks registered secrets in the job log, but not in uploaded JSON or SARIF artifacts or in Code Scanning alert text.

An \`include:\` entry's \`project\_directory:\` has the same gap from 0.28.0: a directory symlink named there makes compose-lint read \`.env\` from wherever the link points.

Pull requests from forks normally run without secrets, and GitHub masks registered secrets in the job log, so in the common setup what can be read is runner metadata and whatever unmasked values the job's environment holds. That is why this is scored as low confidentiality impact. The impact is high in a job that runs untrusted pull requests with secrets in its environment, such as a \`pull\_request\_target\` workflow, or on a CI system that does not mask secrets, and also wherever the JSON or SARIF output is uploaded. The pass/fail result is not affected.

Found during an internal pre-1.0 security review.

\#\#\# Patches

Fixed in 0.31.0. Every \`.env\` read now applies the same containment check as \`env\_file:\`. A \`.env\` that resolves outside the project is treated as missing and reported as an unread input. A \`project\_directory:\` that resolves outside the project is refused, and that entry's files resolve against their own directories. A \`.env\` line containing a NUL byte is skipped.

\#\#\# Workarounds

- Run with \`--no-env\`, which skips the sibling \`.env\` entirely.
- Don't run compose-lint on untrusted pull requests in a job whose environment holds secrets.

\#\#\# Reproduction

\`\`\`
project/.env -\> /proc/self/environ      (symlink)
project/compose.yml:
  services:
    web:
      image: "${FIRST\_VAR\_NAME}"
\`\`\`

\`compose-lint check compose.yml --format json\` quotes the environment in the CL-0004 message ("Image '...' has no tag").

## Affected and fixed versions

- PyPI `compose-lint`: affected \>= 0.22.0, \<= 0.30.0; fixed 0.31.0 (ghsa)
- GitHub Actions `tmatens/compose-lint`: affected \>= 0.22.0, \<= 0.30.0; fixed 0.31.0 (ghsa)

## Technologies

GitHub Actions, PyPI packages

## Mitigation

- Upgrade compose-lint to 0.31.0 or later.
- Upgrade tmatens/compose-lint to 0.31.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-123368. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-123368.md
Affected: compose-lint >= 0.22.0, <= 0.30.0; tmatens/compose-lint >= 0.22.0, <= 0.30.0
Fixed in: 0.31.0

Steps:
1. Search this machine and project for compose-lint (PyPI), tmatens/compose-lint (GitHub Actions): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-123368 being exploited?

There is no confirmed exploitation: CVE-2026-123368 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.70% chance of exploitation in the next 30 days (as of 2026-11-29).

### How serious is CVE-2026-123368?

Low: CVSS 2.3 (v4.0, scored by GitHub). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-123368?

compose-lint \>= 0.22.0, \<= 0.30.0; tmatens/compose-lint \>= 0.22.0, \<= 0.30.0.

### Is there a fix for CVE-2026-123368?

Yes. Fixed in 0.31.0. Upgrade compose-lint to 0.31.0 or later. Upgrade tmatens/compose-lint to 0.31.0 or later.

### How do I check if I'm affected by CVE-2026-123368?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/tmatens/compose-lint/security/advisories/GHSA-6wcv-rj3c-mhv3>
- patch: <https://github.com/tmatens/compose-lint/pull/917>
- patch: <https://github.com/tmatens/compose-lint/commit/c43204ad4dab11d54e20574a52bc4e5835246ca5>
- other: <https://nvd.nist.gov/vuln/detail/CVE-2026-123368>
- other: <https://github.com/tmatens/compose-lint/releases/tag/v0.31.0>
- other: <https://github.com/advisories/GHSA-6wcv-rj3c-mhv3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- GitHub Advisory Database: CC-BY 4.0 <https://github.com/advisories/GHSA-6wcv-rj3c-mhv3> (license: <https://creativecommons.org/licenses/by/4.0/>)
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-123368> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-123368>
