# CVE-2026-46421: Supply chain compromise via malicious package versions (@cap-js/sqlite, @cap-js/postgres, @cap-js/db-service)

> Malicious npm packages harvested credentials and self-propagated, requiring immediate upgrades and credential rotation for affected SAP CAP JS users.

- **Severity:** Critical 9.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Jul 2026
- **Updated:** 15 Jul 2026
- **Also known as:** GHSA-pvw4-cvr4-97p8

## What is CVE-2026-46421?

CVE-2026-46421 is a critical vulnerability in @cap-js/db-service, published on 15 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The SAP Cloud Application Programming Model is a tool for building enterprise-grade cloud applications, and cap-js/cds-dbs is the monorepo for SQL database services for that tool. 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. User should 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. No known workarounds are available.

Weakness: CWE-506 (Embedded Malicious Code)

## Which versions are affected by CVE-2026-46421?

6 open source packages ship an affected version, including @cap-js/db-service, @cap-js/postgres and @cap-js/sqlite.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@cap-js/db-service` | npm | From 2.10.1 | 2.11.0 |
| `@cap-js/db-service` | npm | From 2.10.1 | 2.11.0 |
| `@cap-js/postgres` | npm | From 2.2.2 | 2.3.0 |
| `@cap-js/postgres` | npm | From 2.2.2 | 2.3.0 |
| `@cap-js/sqlite` | npm | From 2.2.2 | 2.3.0 |
| `@cap-js/sqlite` | npm | From 2.2.2 | 2.3.0 |

## How do I fix CVE-2026-46421?

Upgrade @cap-js/db-service to 2.11.0 or later.

## Is CVE-2026-46421 being exploited?

There is no known exploitation of CVE-2026-46421 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-46421 and fix it if it is affected.

What it is: CVE-2026-46421 is a critical vulnerability in @cap-js/db-service, published on 15 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-46421 in the wild and no public exploit code.

Affected packages and fixed versions:
- @cap-js/db-service (npm): affected from 2.10.1; fixed in 2.11.0
- @cap-js/db-service (npm): affected from 2.10.1; fixed in 2.11.0
- @cap-js/postgres (npm): affected from 2.2.2; fixed in 2.3.0
- @cap-js/postgres (npm): affected from 2.2.2; fixed in 2.3.0
- @cap-js/sqlite (npm): affected from 2.2.2; fixed in 2.3.0
- @cap-js/sqlite (npm): affected from 2.2.2; fixed in 2.3.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-46421/ (Markdown: https://insights.sbomify.com/CVE-2026-46421/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-46421
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-46421
- OSV: https://osv.dev/vulnerability/CVE-2026-46421

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-46421/
Summaries are generated and may contain mistakes; the official description above is the record.
