{"id":"CVE-2026-125122","aliases":["CVE-2026-125122","GHSA-hr4h-4c45-v4q4"],"related":[],"kind":"vulnerability","state":"published","title":"compose-lint: Text in a pull request can issue CI workflow commands through compose-lint 0.31.0's JSON and SARIF output on stdout","summary":"compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. In version 0.31.0, compose-lint does not sanitize the ##[ workflow-command opener inside strings written by --format json or --format sarif to stdout. A pull request can place that opener in a service name or other Compose value, and the GitHub Actions runner recognizes it even in the middle of a serialized line when the package, pre-commit hook, or Docker image prints JSON or SARIF to the job log. Writing the output to a file and using the compose-lint GitHub Action are not affected, and the flaw does not change the lint pass or fail result. This issue is fixed in version 0.32.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. In version 0.31.0, compose-lint does not sanitize the ##[ workflow-command opener inside strings written by --format json or --format sarif to stdout. A pull request can place that opener in a service name or other Compose value, and the GitHub Actions runner recognizes it even in the middle of a serialized line when the package, pre-commit hook, or Docker image prints JSON or SARIF to the job log. Writing the output to a file and using the compose-lint GitHub Action are not affected, and the flaw does not change the lint pass or fail result. This issue is fixed in version 0.32.0.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n0.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.\n\nA 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.\n\nAffected 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.\n\nFound 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.\n\n**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.\n\nReleases before 0.31.0 are covered by GHSA-6f4g-xm8v-pgv6.\n\n### Patches\n\nFixed in 0.32.0. JSON and SARIF on stdout escape `##[` inside strings as `\\u005b`, which decodes to the same data.\n\n### Workarounds\n\n- Upgrade to 0.32.0 or later.\n- Write `--format json` and `--format sarif` output to a file rather than the log.\n- 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.\n\n### Reproduction\n\nOn 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-10T16:50:46.826Z","modified":"2026-11-13T16:17:43.487Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"}],"cwes":["CWE-117","CWE-150"],"affected":[{"ranges":[{"version":"= 0.31.0","status":"affected"}],"vendor":"tmatens","product":"compose-lint","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.31.0","status":"affected","fixed":"0.32.0"}],"ecosystem":"PyPI","package":"compose-lint","purl":"pkg:pypi/compose-lint","source":"ghsa"}],"references":[{"url":"https://github.com/tmatens/compose-lint/security/advisories/GHSA-hr4h-4c45-v4q4","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/tmatens/compose-lint/pull/945","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/tmatens/compose-lint/commit/542e63126f795564a65c63887ea0dc558a500688","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/tmatens/compose-lint/releases/tag/v0.32.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125122","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tmatens/compose-lint","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-13T15:25:03.488Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-125122","url":"https://www.cve.org/CVERecord?id=CVE-2026-125122","licence":"CVE Terms of Use","modified":"2026-11-13T15:25:23.463Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hr4h-4c45-v4q4","url":"https://github.com/advisories/GHSA-hr4h-4c45-v4q4","licence":"CC-BY-4.0","modified":"2026-11-10T22:00:03.806Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-125122","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125122","licence":"Public domain","modified":"2026-11-13T16:17:43.487Z"}],"updatedAt":"2026-11-25T22:59:49.793Z","epss":{"score":0.00397,"percentile":0.35998,"date":"2026-12-01T12:00:22.000Z"}}