Skip to content

[Bug]: GitHub Actions workflows vulnerable to expression injection #10113

Closed

Description

@mnencia

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

N/A

Version

trunk (main)

What version of Kubernetes are you using?

N/A

What is your Kubernetes environment?

Other

How did you install the operator?

Other

What happened?

Several GitHub Actions workflows use ${{ }} expressions referencing potentially attacker-controlled values directly inside run: shell blocks. Since GitHub expands these expressions before the shell processes the script, shell quoting provides zero protection and the values can be used to inject arbitrary commands.

This is the same class of vulnerability exploited in the hackerbot-claw campaign disclosed by StepSecurity.

Additionally, several $GITHUB_ENV and $GITHUB_OUTPUT writes use the single-line KEY=VALUE format with potentially tainted values, which is vulnerable to newline injection.

The fix follows a consistent pattern: move ${{ }} expressions from run: blocks into step-level env: blocks, then reference them as properly-quoted shell variables. For $GITHUB_ENV/$GITHUB_OUTPUT writes, use the heredoc delimiter syntax instead of single-line KEY=VALUE.

Fix PRs

Cluster resource

N/A

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. self-assigned this
    on Mar 3, 2026
  2. added theissue type on Mar 3, 2026
  3. 6 remaining items

  4. sxd commented on Mar 6, 2026

    @sxd
    Contributor

    Closing, everything has been merged

  5. moved this from In Progress to Done in Security Mapon Mar 6, 2026
  6. added
    bug 🐛Something isn't working
    and removed on Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions