CVE-2018-3738: Denial of Service in protobufjs
Summary
CVE-2018-3738: Denial of Service in protobufjs. Affects protobufjs across 2 version ranges.
< 5.0.3
>= 6.0.0, < 6.8.6
Fixed in 5.0.3 or 6.8.6, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
protobufjs is an npm package that provides an implementation of the Protocol Buffers data interchange format. It allows developers to define the structure of their data using a language-agnostic interface and then generate code in various programming languages to serialize, deserialize, and manipulate the data. This package is widely used in applications that require efficient and platform-independent data serialization. However, versions of protobufjs before 5.0.3 and 6.8.6 are vulnerable to a regular expression denial of service (ReDoS) when parsing crafted invalid *.proto files.
Vulnerability Detail
The vulnerability in protobufjs arises from a lack of proper input validation when parsing *.proto files. An attacker can exploit this by providing a specially crafted invalid file that triggers a ReDoS attack. When the vulnerable version of protobufjs attempts to parse the malicious file, it gets stuck in an inefficient regular expression pattern matching process, leading to a denial of service condition. This can result in excessive CPU and memory usage, causing the application to become unresponsive or crash. The severity of this vulnerability is rated as MODERATE with a CVSS score of 5.5.
How To Fix
Latest published version: 8.8.1 as of 23 Oct 2026
npm install protobufjs@8.8.1
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 5.0.35.0.3npm install protobufjs@5.0.3 -
>= 6.0.0, < 6.8.66.8.6npm install protobufjs@6.8.6
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed versions mentioned above to mitigate the risk of a ReDoS attack.
Conclusion
The vulnerability in protobufjs versions before 5.0.3 and 6.8.6 can be exploited through crafted invalid *.proto files, leading to a denial of service condition. To mitigate this risk, it is crucial to update to the fixed versions mentioned above. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for protobufjs →
FAQ
protobufjs is an npm package that provides an implementation of the Protocol Buffers data interchange format. It allows developers to define the structure of their data using a language-agnostic interface and then generate code in various programming languages to serialize, deserialize, and manipulate the data.
A regular expression denial of service (ReDoS) attack is a type of vulnerability where an attacker can exploit inefficient regular expressions to cause a denial of service condition. By providing specially crafted input, the attacker can trigger excessive CPU and memory usage, leading to application slowdown or crash.
The potential consequences of this vulnerability include application unresponsiveness, increased CPU and memory usage, and possible application crashes. An attacker could exploit this vulnerability to disrupt the availability of the affected application.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities using just the package-lock.json file, without requiring access to the code or installation.
You can find more information about this vulnerability, including the affected versions and fixed versions, in the GitHub Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/10/GHSA-762f-c2wg-m8c8/GHSA-762f-c2wg-m8c8.json
Related vulnerabilities
Recent vulnerabilities recorded for protobufjs.