# CVE-2018-3738: Denial of Service in protobufjs

> Attackers can cause denial of service in applications using protobufjs by supplying crafted invalid .proto files that trigger excessive CPU consumption.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 Jun 2018
- **Updated:** 16 Sep 2024
- **Also known as:** CLSA-2026-1785291242, GHSA-762f-c2wg-m8c8

## What is CVE-2018-3738?

CVE-2018-3738 is a medium-severity denial of service vulnerability in HackerOne protobufjs node module, published on 7 Jun 2018. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

protobufjs is vulnerable to ReDoS when parsing crafted invalid .proto files.

Weakness: CWE-185 (Incorrect Regular Expression), CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2018-3738?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `protobufjs` | npm | All versions | 5.0.3 |
| `protobufjs` | npm | All versions | 5.0.3 |
| `protobufjs` | npm | From 6.0.0 | 6.8.6 |
| `protobufjs` | npm | From 6.0.0 | 6.8.6 |

Products: Protobufjs Project Protobufjs.

## How do I fix CVE-2018-3738?

Upgrade protobufjs to a fixed version for your release line: 5.0.3 or 6.8.6.

## Is CVE-2018-3738 being exploited?

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

## Other vulnerabilities in HackerOne protobufjs node module

- [CVE-2023-36665](https://insights.sbomify.com/CVE-2023-36665/): protobufjs Prototype Pollution vulnerability (critical 9.8)
- [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)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-3738 and fix it if it is affected.

What it is: CVE-2018-3738 is a medium-severity denial of service vulnerability in HackerOne protobufjs node module, published on 7 Jun 2018. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2018-3738 in the wild and no public exploit code.

Affected packages and fixed versions:
- protobufjs (npm): affected all versions; fixed in 5.0.3
- protobufjs (npm): affected all versions; fixed in 5.0.3
- protobufjs (npm): affected from 6.0.0; fixed in 6.8.6
- protobufjs (npm): affected from 6.0.0; fixed in 6.8.6

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

## Sources

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

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