Someone compromised SAP's npm packages and used the CI pipeline against itself
Posted by BattleRemote3157@reddit | programming | View on Reddit | 15 comments
We founded 4 SAP packages which were actually published today with a malicious preinstall hook. packages are cap-js/sqlite, cap-js/postgres, cap-js/db-service, and mbt The payload is stealing GitHub tokens, npm tokens or AWS/Azure/GCP credentials, and then uses the stolen GitHub token to commit back into the victim's own repos which in return dropping a vs code tasks.json that re runs the attack every time someone opens the project.
the interesting thing we found that the attacker modified CI workflow to extract an OIDC token and publish to npm directly which bypass the normal release pipeline entirely. The malicious versions have zero SLSA attestations otherwise the legit ones have two. If you run any of these packages, rotate everything now please
h4l@reddit
Why do package managers not enforce slsa provenance for packages, like how HTTPS can be required via HSTS or SPF to allowlist email senders?
mirrax@reddit
It's TeamPCP linked, so it's part of the same supply chain campaign that's gotten Aqua Security’s Trivy, Checkmarx’s KICS, LiteLLM, and BitWarden's CLI.
AreWeNotDoinPhrasing@reddit
Damn, they got BitWarden too! I hadn't seen that one yet. Wow.
mirrax@reddit
Just ~300 downloads of the CLI, caught in under 90 minutes. Trivy and Checkmarx are way more significant. And those also like the source of most of the GitHub Actions creds that will continue the campaign, for example BitWarden using Checkmarx for scanning in their pipeline.
LeafyAlaya@reddit
Paws up!
joashua99@reddit
I mean, at this point, npm is just a trojan horse to execute arbitrary code on anyone's machine.
Nice_Mix_1021@reddit
a mini shai hulud. WOW
Kok_Nikol@reddit
It's a stunted worm, only reaches about 9 meters...
neopointer@reddit
Sadly many ppl make the bad decision to use anything from SAP, the worst of the big tech companies
lurker_in_spirit@reddit
Sadly many ppl make the bad decision to use anything from ~~SAP, the worst of the big tech companies~~ npm
neopointer@reddit
Well the whole ecosystem kind of sucks, but whenever I have a chance, I have to bash onto SAP
BroBroMate@reddit
And that's fair, when the best documentation is auf Deutsch...
z8chary@reddit
Why aren't the packages proprietary and kept far away
CoryCoolguy@reddit
But at least I have to do two factor twice to publish now.
moreVCAs@reddit
https://imgflip.com/i/aqhpyd