# CVE-2026-41242: protobufjs has an arbitrary code execution issue

> Attackers can inject arbitrary code into protobuf definitions that executes during object decoding, allowing remote code execution in applications using the library.

- **Severity:** Critical 9.4 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Apr 2026
- **Updated:** 9 Sep 2026
- **Also known as:** CLEANSTART-2026-BY01159, CLEANSTART-2026-XC94160, CLSA-2026-1778114667, ECHO-bb3f-55f6-c0f6, GHSA-xq3m-2v4x-88gg, MINI-26v9-9486-q27w, MINI-27r9-hv49-7fhh, MINI-35qg-4fjh-xvpj, MINI-3m5q-mc88-cxx2, MINI-42q3-g7w5-f556, MINI-6r9x-g3hw-62wc, MINI-9725-9fq5-3g26, MINI-9c3w-25fx-gjcj, MINI-c635-9c6v-g7hc, MINI-f7wg-h7c9-5983, MINI-g62v-3x66-h843, MINI-jcjj-r9hj-9jqw, MINI-pmcm-w7pw-8jc3, MINI-rc54-65rg-pxp9, ROOT-APP-NPM-CVE-2026-41242

## What is CVE-2026-41242?

CVE-2026-41242 is a critical code injection vulnerability in protobufjs protobuf.js, published on 18 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

protobufjs compiles protobuf definitions into JavaScript (JS) functions. In versions prior to 8.0.1 and 7.5.5, attackers can inject arbitrary code in the "type" fields of protobuf definitions, which will then execute during object decoding using that definition. Versions 8.0.1 and 7.5.5 patch the issue.

Weakness: CWE-94 (Improper Control of Generation of Code)

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

4 open source packages ship an affected version, including protobufjs. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `protobufjs` | npm | All versions | 7.5.5 |
| `protobufjs` | npm | All versions | 7.5.5 |
| `protobufjs` | npm | From 8.0.0 | 8.0.1 |
| `protobufjs` | npm | From 8.0.0 | 8.0.1 |

Products: Protobufjs Project Protobufjs.

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

Upgrade protobufjs to a fixed version for your release line: 7.5.5 or 8.0.1.

## Is CVE-2026-41242 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41242 exists.

Public exploit code:

- some simple node.js web app with PoC code for CVE-2026-41242 (github_poc): https://github.com/4chech/CVE-2026-41242
- https://github.com/Giangdurian/CVE-2026-41242 (github_poc): https://github.com/Giangdurian/CVE-2026-41242

## Other vulnerabilities in protobufjs protobuf.js

- [CVE-2023-36665](https://insights.sbomify.com/CVE-2023-36665/): protobufjs Prototype Pollution vulnerability (critical 9.8)
- [CVE-2022-25878](https://insights.sbomify.com/CVE-2022-25878/): Prototype Pollution (high 8.2)
- [CVE-2026-44291](https://insights.sbomify.com/CVE-2026-44291/): protobufjs: Code generation gadget after prototype pollution (high 8.1)
- [CVE-2026-44293](https://insights.sbomify.com/CVE-2026-44293/): protobufjs: Code injection through bytes field defaults in generated toObject code (high 7.7)
- [CVE-2026-48712](https://insights.sbomify.com/CVE-2026-48712/): protobufjs: Denial of service through unbounded Any expansion during JSON conversion (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-41242 is a critical code injection vulnerability in protobufjs protobuf.js, published on 18 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-41242 exists.

Affected packages and fixed versions:
- protobufjs (npm): affected all versions; fixed in 7.5.5
- protobufjs (npm): affected all versions; fixed in 7.5.5
- protobufjs (npm): affected from 8.0.0; fixed in 8.0.1
- protobufjs (npm): affected from 8.0.0; fixed in 8.0.1

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-41242/ (Markdown: https://insights.sbomify.com/CVE-2026-41242/index.md)
```

## Sources

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

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