# CVE-2023-36665: protobufjs Prototype Pollution vulnerability

> Attackers can pollute Object.prototype via untrusted protobuf messages, potentially leading to code execution or privilege escalation in applications using protobuf.js.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jul 2023
- **Updated:** 2 Aug 2024
- **Also known as:** ECHO-92a2-ec02-92b1, GHSA-h755-8qp9-cq85, MINI-mhcg-r6px-rgwh, ROOT-APP-NPM-CVE-2023-36665

## What is CVE-2023-36665?

CVE-2023-36665 is a critical vulnerability in n/a, published on 5 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

"protobuf.js (aka protobufjs) 6.10.0 through 7.x before 7.2.5 allows Prototype Pollution, a different vulnerability than CVE-2022-25878. A user-controlled protobuf message can be used by an attacker to pollute the prototype of Object.prototype by adding and overwriting its data and functions. Exploitation can involve: (1) using the function parse to parse protobuf messages on the fly, (2) loading .proto files by using load/loadSync functions, or (3) providing untrusted input to the functions ReflectionObject.setParsedOption and util.setProperty.

Weakness: CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2023-36665?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `protobufjs` | npm | From 6.10.0 | 6.11.4 |
| `protobufjs` | npm | From 6.10.0 | 6.11.4 |
| `protobufjs` | npm | From 7.0.0 | 7.2.5 |
| `protobufjs` | npm | From 7.0.0 | 7.2.5 |

Products: Protobufjs Project Protobufjs.

## How do I fix CVE-2023-36665?

Upgrade protobufjs to a fixed version for your release line: 6.11.4 or 7.2.5.

## Is CVE-2023-36665 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2026-41242](https://insights.sbomify.com/CVE-2026-41242/): protobufjs has an arbitrary code execution issue (critical 9.4)
- [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-2023-36665 and fix it if it is affected.

What it is: CVE-2023-36665 is a critical vulnerability in n/a, published on 5 Jul 2023. 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-2023-36665 in the wild and no public exploit code.

Affected packages and fixed versions:
- protobufjs (npm): affected from 6.10.0; fixed in 6.11.4
- protobufjs (npm): affected from 6.10.0; fixed in 6.11.4
- protobufjs (npm): affected from 7.0.0; fixed in 7.2.5
- protobufjs (npm): affected from 7.0.0; fixed in 7.2.5

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

## Sources

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

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