Vulnerabilities in pkg:npm/@cap-js/postgres

PACKAGE
Advisory Identifier: GHSA-pvw4-cvr4-97p8
Advisory Summary

CVE-2026-46421 is a CRITICAL supply chain compromise vulnerability (CWE-506: Embedded Malicious Code) affecting @cap js/sqlite libraries in the npm ecosystem. The issue involves supply chain compromise via malicious package versions (@cap-js/sqlite, @cap-js/postgres, @cap-js/db-service). Remediation is available by upgrading affected packages to version 2.3.0, 2.11.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@cap-js/postgres

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@cap-js/postgres. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pvw4-cvr4-97p8 CVE-2026-46421 CRITICAL Supply chain compromise via malicious package versions (@cap-js/sqlite, @cap-js/postgres, @cap-js/db-service)

CVE-2026-46421 at a Glance

CVE Identifier CVE-2026-46421
GHSA Identifier GHSA-pvw4-cvr4-97p8
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-506: Embedded Malicious Code
Affected Product @cap js/sqlite
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-46421

To remediate this vulnerability, upgrade all affected @cap js/sqlite dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@cap-js/sqlite fixed: 2.3.0
npm install @cap-js/sqlite@2.3.0
@cap-js/postgres fixed: 2.3.0
npm install @cap-js/postgres@2.3.0
@cap-js/db-service fixed: 2.11.0
npm install @cap-js/db-service@2.11.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @cap-js/sqlite

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-46421, inspect your project dependencies using npm:

npm ls @cap-js/sqlite

Analyze the terminal output to locate any version of @cap js/sqlite in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.0), your application is affected.

Note: The npm ls @cap-js/sqlite command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-506: Embedded Malicious Code, where the product contains code that appears to be malicious in nature. In @cap js/sqlite, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Impact On April 29, 2026, compromised versions of `@cap-js/sqlite@2.2.2`, `@cap-js/postgres@2.2.2`, and `@cap-js/db-service@2.10.1` were published. The malicious packages harvested credentials and attempted self-propagation. If a compromised version was installed, all credentials accessible on that machine (npm tokens, cloud provider credentials, SSH keys, GitHub PATs) should be considered compromised. ## Patches Upgrade to `@cap-js/sqlite` >= 2.4.0, `@cap-js/postgres` >= 2.3.0, `@cap-js/db-service` >= 2.11.0. If a compromised version was ever installed, rotate all affected credentials. ## Workarounds No workarounds.

CVE-2026-46421 Affected @cap js/sqlite Versions

3 component(s)
Fixed Versions:
2.3.02.11.0
Product / Package Ecosystem Affected Versions Fixed Version
@cap-js/sqlite
npm
≥ 2.2.2
< 2.3.0
All 1 versions
2.2.2
2.3.0
@cap-js/postgres
npm
≥ 2.2.2
< 2.3.0
All 1 versions
2.2.2
2.3.0
@cap-js/db-service
npm
≥ 2.10.1
< 2.11.0
All 1 versions
2.10.1
2.11.0

References

Frequently Asked Questions

What is CVE-2026-46421?
CVE-2026-46421 is a security vulnerability in @cap js/sqlite involving Supply chain compromise via malicious package versions (@cap-js/sqlite, @cap-js/postgres, @cap-js/db-service) under CWE-506: Embedded Malicious Code.
Which @cap js/sqlite versions are affected?
Affected versions include releases prior to 2.3.0, 2.11.0 across affected packages: @cap-js/sqlite, @cap-js/postgres, @cap-js/db-service.
What version fixes CVE-2026-46421?
Upgrading to 2.3.0, 2.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @cap-js/sqlite affected?
Yes, @cap-js/sqlite is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
Is @cap-js/postgres affected?
Yes, @cap-js/postgres is affected in releases prior to 2.3.0. Upgrade your dependency to 2.3.0 or later.
What CWE is associated with CVE-2026-46421?
CVE-2026-46421 is classified under CWE-506: Embedded Malicious Code (The product contains code that appears to be malicious in nature.).
How can I check npm dependencies for CVE-2026-46421?
Run the dependency tree command: 'npm ls @cap-js/sqlite'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pvw4-cvr4-97p8",
  "modified" : "2026-05-20T15:33:04Z",
  "published" : "2026-05-20T15:33:04Z",
  "aliases" : [ "CVE-2026-46421" ],
  "summary" : " Supply chain compromise via malicious package versions (@cap-js/sqlite,  @cap-js/postgres, @cap-js/db-service)",
  "details" : "## Impact\n\nOn April 29, 2026, compromised versions of `@cap-js/sqlite@2.2.2`, `@cap-js/postgres@2.2.2`, and `@cap-js/db-service@2.10.1` were published.\nThe malicious packages harvested credentials and attempted self-propagation.\nIf a compromised version was installed, all credentials accessible on that machine (npm tokens, cloud provider credentials, SSH keys, GitHub PATs) should be considered compromised.\n\n## Patches\n\nUpgrade to `@cap-js/sqlite` >= 2.4.0, `@cap-js/postgres` >= 2.3.0, `@cap-js/db-service` >= 2.11.0.\nIf a compromised version was ever installed, rotate all affected credentials.\n\n## Workarounds\n\nNo workarounds.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cap-js/sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.2"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ],
    "versions" : [ "2.2.2" ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cap-js/postgres"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.2"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ],
    "versions" : [ "2.2.2" ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cap-js/db-service"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.1"
      }, {
        "fixed" : "2.11.0"
      } ]
    } ],
    "versions" : [ "2.10.1" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cap-js/cds-dbs/security/advisories/GHSA-pvw4-cvr4-97p8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cap-js/cds-dbs"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3747787"
  }, {
    "type" : "WEB",
    "url" : "https://www.sap.com/documents/2026/05/8203a8b9-4d7f-0010-bca6-c68f7e60039b.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.stepsecurity.io/blog/a-mini-shai-hulud-has-appeared"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-506" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-20T15:33:04Z",
    "nvd_published_at" : null
  }
}