CVE-2026-123368

CVE-2026-123368 is a low-severity path traversal vulnerability in compose-lint (pip), affecting versions >= 0.22.0, <= 0.30.0. It is fixed in 0.31.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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").

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.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

CVE-2026-123368 has a CVSS score of 3.1 (Low). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.31.0); upgrading removes the vulnerable code path.

Affected versions

compose-lint (>= 0.22.0, <= 0.30.0) tmatens/compose-lint (>= 0.22.0, <= 0.30.0)

Security releases

compose-lint → 0.31.0 (pip) tmatens/compose-lint → 0.31.0 (actions)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-123368? CVE-2026-123368 is a low-severity path traversal vulnerability in compose-lint (pip), affecting versions >= 0.22.0, <= 0.30.0. It is fixed in 0.31.0. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is CVE-2026-123368? CVE-2026-123368 has a CVSS score of 3.1 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-123368?
    • compose-lint (pip) (versions >= 0.22.0, <= 0.30.0)
    • tmatens/compose-lint (actions) (versions >= 0.22.0, <= 0.30.0)
  4. Is there a fix for CVE-2026-123368? Yes. CVE-2026-123368 is fixed in 0.31.0. Upgrade to this version or later.
  5. Is CVE-2026-123368 exploitable, and should I be worried? Whether CVE-2026-123368 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-123368 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-123368?
    • Upgrade compose-lint to 0.31.0 or later
    • Upgrade tmatens/compose-lint to 0.31.0 or later

Other vulnerabilities in compose-lint

Stop the waste.
Protect your environment with Kodem.