CVE-2025-8022 Bun Shell does not invoke /bin/sh, or any other interpreter, for template literals created with the $ function.

Not scored Published Updated
Exploited in the wild
Not known
Fix
None listed

What is CVE-2025-8022?

CVE-2025-8022 is a vulnerability in bun, published on 23 Jul 2025.

Official description

Bun Shell does not invoke /bin/sh, or any other interpreter, for template literals created with the $ function. Each ${…} interpolation is treated as a single argument. The security responsibility for this usage pattern lies with the calling application, which must ensure the sanitization and validation of any untrusted arguments before passing them to the executed commands. Therefore, the potential for command injection is not a flaw within Bun itself; rather, it is an argument injection that is contingent on its implementation by the consuming application.

Which versions are affected by CVE-2025-8022?

1 open source package ship an affected version, including bun.

PackageAffectedFixed in
bun npmAll versions to 1.1.39None

How do I fix CVE-2025-8022?

No fix has been published for CVE-2025-8022 yet. Limit exposure of the affected software until one is available.

Is CVE-2025-8022 being exploited?

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

Sources

Also known as GHSA-4j66-8f4r-3pjx.

Is CVE-2025-8022 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free