Skip to main content
MalwarePublished Updated

@cap-js/postgres (npm) · Malicious Code

Affects @cap-js/postgresSource GCVE Database

0

Malicious package : remove @cap-js/postgres and rotate any secrets on hosts that installed it.

Data as of 27 Oct 2026, 00:33 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-3177

What to do

Remove @cap-js/postgres from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npm@cap-js/postgresAffected
  • =2.2.2
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The npm package @cap-js/postgres version 2.2.2 was compromised via supply chain attack by a threat actor impersonating SAP maintainers. Malicious files setup.mjs and execution.js were included in the package tarball with a preinstall hook executing setup.mjs. The setup.mjs file was hidden from package.json allowlist inspection, indicating deliberate evasion. The large execution.js file likely contains a payload or exfiltration binary. This package is used as a PostgreSQL adapter in SAP's Cloud Application Programming model, and its compromise risks exposure of database credentials and build environment secrets.

References

Community reviews

Loading reviews…