kics-github-action icon indicating copy to clipboard operation
kics-github-action copied to clipboard

CRITICAL SECURITY ADVISORY: Repository compromised - Malware injected in all Git Tags

Open cyril-flieller opened this issue 8 months ago • 16 comments

We have identified that this repository has been compromised. A malicious script has been injected into all existing Git tags. While the master branch currently appears clean, every release tag now points to a malicious commit that was not authored by the original maintainers.

The injected code is a sophisticated Infostealer designed to:

  • Steal Secrets: Scans for AWS, Azure, GCP credentials, SSH keys, and Kubernetes tokens

  • Memory Dump: Extracts secrets directly from the RAM of CI/CD runners (targeting Runner.Worker)

  • Exfiltrate Data: Encrypts stolen data and sends it to an external server (checkmarx.zone) or creates a hidden release in a rogue repository using the victim's GITHUB_TOKEN

  • Persistence: Attempts to install a backdoor via a systemd service (sysmon) and deploy privileged pods in Kubernetes clusters

➡️ https://github.com/Checkmarx/kics-github-action/blob/v2.1.20/setup.sh

cyril-flieller avatar Mar 23 '26 15:03 cyril-flieller

@cx-artur-ribeiro

cyril-flieller avatar Mar 23 '26 16:03 cyril-flieller

We are currently investigating the issue, thanks for the warning! We will make the necessary changes as soon as possible!

cx-artur-ribeiro avatar Mar 23 '26 17:03 cx-artur-ribeiro

The issue is resolved now.

cx-bruno-silva avatar Mar 23 '26 18:03 cx-bruno-silva

hello, do we know when malicious versions were deployed?

riuvshyn avatar Mar 23 '26 20:03 riuvshyn

Today around 12:00 CET A clear communication is needed

yverry avatar Mar 23 '26 21:03 yverry

does anyone still have a copy of the setup.sh ? Having that would help a lot to understand potential impact.

riuvshyn avatar Mar 24 '26 14:03 riuvshyn

does anyone still have a copy of the setup.sh ? Having that would help a lot to understand potential impact.

these articles go into some great detail

https://www.wiz.io/blog/teampcp-attack-kics-github-action

https://www.sysdig.com/blog/teampcp-expands-supply-chain-compromise-spreads-from-trivy-to-checkmarx-github-actions#the-checkmarx-wave

codymaust avatar Mar 24 '26 15:03 codymaust

does anyone still have a copy of the setup.sh ? Having that would help a lot to understand potential impact.

You can see it in the commit here: https://github.com/checkmarx/kics-github-action/commit/8e20c7a67bb95632e2040327a355fb97e6014d29

aamir-consensys avatar Mar 24 '26 17:03 aamir-consensys

Hi! is it possible to create a GitHub Advisory Database in security tab please ? this need to be documented for people using it.

sofianlak avatar Mar 24 '26 20:03 sofianlak

@cx-artur-ribeiro @cx-bruno-silva

can you please share which tags in this repository were compromised? there is a lot of conflicting information out there

i came across some information that indicates that only v1.1 was compromised? but other security research blogs have claimed contrary information

we were pointing to other versions (v2 and v1.7.0), but went ahead and assumed compromise and rolled secrets accordingly

EDIT: and thank you to @cyril-flieller for identifying and creating this github issue!

codymaust avatar Mar 25 '26 15:03 codymaust

Hi everyone,

you can find the official communication here: https://checkmarx.com/blog/checkmarx-security-update/ Please, follow the recommendations therein.

Meanwhile, we have ongoing investigations to get further details.

Thank you all!

cx-nuno-oliveira avatar Mar 26 '26 21:03 cx-nuno-oliveira

Can you also pin the digest of the docker image so that a poisoned docker image tag cannot make it into the Actions. Right now even if we SHA-pin the github action, it still pulls the image 2.1.20 which can be poisoned. https://github.com/Checkmarx/kics-github-action/blob/master/Dockerfile#L1

bsgrigorov avatar Apr 22 '26 22:04 bsgrigorov

@cx-nuno-oliveira @cx-bruno-silva can you also please SHA-pin the semver tag in the Dockefile vs reference a tag (which may be mutable ob Docker Hub)

bsuv avatar Apr 22 '26 22:04 bsuv

https://github.com/Checkmarx/kics-github-action/pull/155

bsgrigorov avatar Apr 23 '26 04:04 bsgrigorov

#155

@bsgrigorov There is a new digest for v2.1.20-debian now. Do we know which ones were infected or is this because of docker recovering them?

typecastcloud avatar Apr 23 '26 08:04 typecastcloud

@typecastcloud the digest I used is the latest one after docker recovered the tags that were from last month before the exploit. I see they downgraded to 2.1.19 to be safe tho until the pushed image digests for the new one can be confirmed to not be poisoned. https://github.com/Checkmarx/kics-github-action/pull/156

bsgrigorov avatar Apr 23 '26 08:04 bsgrigorov