All vulnerabilities

PyPI

CVE-2026-123368

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

Severity
Low 3.1
Published
10 Nov 2026
Last changed
10 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.31.0
Exploit chance
0.6% in the next 30 daysHigher than 48% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Path traversal (CWE-22)Link following (CWE-59)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
Also known as
GHSA-6wcv-rj3c-mhv3
Sources
OSV.dev and GitHub

Description

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

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.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
compose-lintPyPI · osv:PyPI:compose-lint
  • From 0.22.0 before 0.31.0

About compose-lint

Weekly downloads (PyPI)
2,476PyPI Stats, 24 Nov 2026

References