# GHSA-jpvj-wpmj-h7rv: Supply chain compromise via malicious @cap-js/openapi

> A compromised npm package harvested credentials and self-propagated, requiring immediate upgrade and credential rotation for affected users.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Jun 2026

## What is GHSA-jpvj-wpmj-h7rv?

GHSA-jpvj-wpmj-h7rv is a vulnerability in @cap-js/openapi, published on 4 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

On May 19, 2026, a compromised version of @cap-js/openapi@1.4.1 was 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/openapi >= 1.4.2
If the compromised version was ever installed, rotate all affected credentials.

### Workarounds
No workarounds.

### References

- [SAP Note 3747787](https://me.sap.com/notes/3747787)
- [Developer FAQ](https://www.sap.com/documents/2026/05/8203a8b9-4d7f-0010-bca6-c68f7e60039b.html)

## Which versions are affected by GHSA-jpvj-wpmj-h7rv?

2 open source packages ship an affected version, including @cap-js/openapi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@cap-js/openapi` | npm | From 1.4.1 | 1.4.2 |
| `@cap-js/openapi` | npm | From 1.4.1 | 1.4.2 |

## How do I fix GHSA-jpvj-wpmj-h7rv?

Upgrade @cap-js/openapi to 1.4.2 or later.

## Is GHSA-jpvj-wpmj-h7rv being exploited?

There is no known exploitation of GHSA-jpvj-wpmj-h7rv in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jpvj-wpmj-h7rv and fix it if it is affected.

What it is: GHSA-jpvj-wpmj-h7rv is a vulnerability in @cap-js/openapi, published on 4 Jun 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 GHSA-jpvj-wpmj-h7rv in the wild and no public exploit code.

Affected packages and fixed versions:
- @cap-js/openapi (npm): affected from 1.4.1; fixed in 1.4.2
- @cap-js/openapi (npm): affected from 1.4.1; fixed in 1.4.2

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/GHSA-jpvj-wpmj-h7rv/ (Markdown: https://insights.sbomify.com/GHSA-jpvj-wpmj-h7rv/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jpvj-wpmj-h7rv

---
From sbomify Insights: https://insights.sbomify.com/GHSA-jpvj-wpmj-h7rv/
Summaries are generated and may contain mistakes; the official description above is the record.
