Embedded Malicious Code Affecting @cap-js/postgres package, versions =2.2.2


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Attacked

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-CAPJSPOSTGRES-16321403
  • published29 Apr 2026
  • disclosed28 Apr 2026
  • creditSai Likhith

Introduced: 28 Apr 2026

New Malicious CVE NOT AVAILABLE CWE-506  (opens in a new tab)

How to fix?

Avoid using all malicious instances of the @cap-js/postgres package.

Overview

@cap-js/postgres is a CDS database service for Postgres

Affected versions of this package are vulnerable to Embedded Malicious Code that conceals an obfuscated payload designed to steal developer credentials during the package installation. The malicious versions and their contents are actively being removed from the official package manager.

Malware Behavior

The attack relies on a pre-install script (node setup.mjs) that triggers an 11.6 MB heavily obfuscated script (execution.js) during package installation. Once executed on a developer's machine, the malware steals the developer's credentials and weaponizes them to automatically create public GitHub repositories under the victim's account. These auto-generated repositories carry the hardcoded description "A Mini Shai-Hulud has Appeared" and serve as a live data exfiltration channel.

CVSS Base Scores

version 4.0
version 3.1