GHSA-hr4h-4c45-v4q4

Suggest an improvement
Source
https://github.com/advisories/GHSA-hr4h-4c45-v4q4
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-hr4h-4c45-v4q4/GHSA-hr4h-4c45-v4q4.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hr4h-4c45-v4q4
Aliases
  • CVE-2026-125122
Published
2026-11-10T21:40:50Z
Modified
2026-11-10T22:00:03Z
Severity
  • 2.3 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N CVSS Calculator
Summary
compose-lint: Text in a pull request can issue CI workflow commands through JSON and SARIF output on stdout
Details

Impact

0.31.0 fixed GHSA-6f4g-xm8v-pgv6, where text from a Compose file became GitHub Actions workflow commands in compose-lint's output. --format json and --format sarif output never passed through that fix, so ##[ inside a service name or other value reaches the log intact when the output is printed to stdout rather than written to a file. The runner acts on ##[ in the middle of a line, so the JSON layout does not prevent it.

A pull request can therefore create annotations, fold or hide parts of the job log, or issue other commands the runner accepts, when CI runs compose-lint over it, before anyone reviews it. The pass/fail result is not changed.

Affected setups print JSON or SARIF output to a CI log from the compose-lint package, the pre-commit hook or the Docker image. Writing that output to a file, which SARIF upload requires, is not affected. The GitHub Action turns command processing off around each compose-lint run, so it is not affected.

Found during an internal pre-1.0 security review. It was first published as part of GHSA-r7j4-crjv-h467, together with four other gaps in the same fix. Each gap now has its own advisory.

Docker image. composelint/compose-lint tag 0.31.0 and the matching minor tag are affected, as was latest while it pointed to 0.31.0.

Releases before 0.31.0 are covered by GHSA-6f4g-xm8v-pgv6.

Patches

Fixed in 0.32.0. JSON and SARIF on stdout escape ##[ inside strings as \u005b, which decodes to the same data.

Workarounds

  • Upgrade to 0.32.0 or later.
  • Write --format json and --format sarif output to a file rather than the log.
  • On GitHub Actions, use the tmatens/compose-lint Action, or bracket the compose-lint step with ::stop-commands::<random token> and ::<token>::, as the Action does.

Reproduction

On compose-lint 0.31.0 on a GitHub-hosted runner (runner 2.337.0), a service named a##[warning]X, linted with --format json or --format sarif to stdout, creates annotations. The same file linted with the text report creates none. The composelint/compose-lint:0.31.0 image produces byte-identical output to the package.

Database specific
{
    "cwe_ids": [
        "CWE-117",
        "CWE-150"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-10T21:40:50Z",
    "nvd_published_at": "2026-11-10T17:17:26Z",
    "severity": "LOW"
}
References

Affected packages

PyPI / compose-lint

Package

Name
compose-lint
View open source insights on deps.dev
Purl
pkg:pypi/compose-lint

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0.31.0
Fixed
0.32.0

Affected versions

0.*
0.31.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-hr4h-4c45-v4q4/GHSA-hr4h-4c45-v4q4.json"