GHSA-8v59-qmwv-4p6q: compose-lint: File paths embedded in pull requests can inject CI workflow commands through command-line error messages

Published Nov 10, 2026
·
Updated

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. The fix escapes the command openers in compose-lint's own output, but not in the argument parser's error messages. When a repository path reaches compose-lint's arguments without a -- before it, the argument parser prints it raw in its error message. That includes a carriage return, which the runner treats as a line break, so a command can also start a new line there.

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 pass repository paths to compose-lint without a -- before them: the pre-commit hook when args: is set without the documented trailing --, or the compose-lint package or Docker image called that way in a workflow. The pre-commit hook's default configuration passes -- and 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. The argument parser's messages go through the same sanitizer as the rest of compose-lint's output.

Workarounds

- Upgrade to 0.32.0 or later. - End the pre-commit hook's args: with --, and put -- before file paths when calling compose-lint directly. - 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), compose-lint '--##[warning]X/compose.yml' with no -- creates an annotation. The same path after -- creates none. The composelint/compose-lint:0.31.0 image produces byte-identical output to the package.

Affected Software

2 affected componentsFixes available
pip/compose-lint=0.31.0
0.32.0
pip/compose-lint>=0.31.0<0.32.0
0.32.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/compose-lint to a version that resolves this vulnerability.

    Fixed in 0.32.0
  2. Upgrade

    Upgrade composelint/compose-lint to a version that resolves this vulnerability.

    Fixed in 0.32.0
  3. Configuration

    End the pre-commit hook's args: with --, and put -- before repository file paths when calling compose-lint directly.

    compose-lint pre-commit hook and direct CLI invocation -- argument delimiter = --
  4. Compensating control

    On GitHub Actions, use the tmatens/compose-lint Action, or bracket each compose-lint step with ::stop-commands::<random token> and ::<token>::.

Event History

Nov 10, 2026
Advisory Published
via GitHub·09:58 PM
Data Sourced
via GitHub·09:58 PM
DescriptionWeaknessAffected Software
Data Sourced
via OSV·09:58 PM
DescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203