GHSA-762f-c2wg-m8c8 CVE-2018-3738
Denial of Service in protobufjs
- Severity
- 5.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.94%
- Chance of exploitation in the next 30 days. Higher than 61.05% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-1333 Inefficient Regular Expression Complexity
- Fix
6.8.6- Upgrade protobufjs to this version or later
Description
Versions of protobufjs before 5.0.3 and 6.8.6 are vulnerable to a regular expression denial of service when parsing crafted invalid *.proto files.
Recommendation
Update to version 5.0.3, 6.8.6 or later.
Affected versions
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| protobufjs | >= 6.0.0, < 6.8.6 |
6.8.6 |
| protobufjs | < 5.0.3 |
5.0.3 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
protobufjs npm → 6.8.6
- npm
npm install protobufjs@6.8.6- yarn
yarn add protobufjs@6.8.6- pnpm
pnpm add protobufjs@6.8.6
Severity breakdown
CVSS 3.1 5.5
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-1333: Inefficient Regular Expression Complexity
The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
How to prevent it
- Architecture and Design: Use regular expressions that do not support backtracking, e.g. by removing nested quantifiers.
- System Configuration: Set backtracking limits in the configuration of the regular expression implementation, such as PHP's pcre.backtrack_limit. Also consider limits on execution time for the process.
- Implementation: Do not use regular expressions with untrusted input. If regular expressions must be used, avoid using backtracking in the expression.
- Implementation: Limit the length of the input that the regular expression will process.
References
Advisories
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-j3f2-48v5-ccww protobufjs: Denial of Service via infinite loop in .proto option parsing | High | Also affects protobufjs |
| GHSA-jfj6-75fj-8934 protobufjs: Text Format string map parsing can mutate returned map object prototype | Medium | Also affects protobufjs |
| GHSA-94rc-8x27-4472 protobufjs: Memory amplification from preserved unknown fields in binary decode | Medium | Also affects protobufjs |
| GHSA-wcpc-wj8m-hjx6 protobufjs: Denial of service through unbounded Any expansion during JSON conversion | High | Also affects protobufjs |
| GHSA-f38q-mgvj-vph7 protobufjs : Schema-derived names can shadow runtime-significant properties | Medium | Also affects protobufjs |
| GHSA-jggg-4jg4-v7c6 protobufjs: Denial of Service via unbounded recursive JSON descriptor expansion | High | Also affects protobufjs |
| GHSA-2pr8-phx7-x9h3 protobuf.js: Denial of service from crafted field names in generated code | Medium | Also affects protobufjs |
| GHSA-66ff-xgx4-vchm protobuf.js: Code injection through bytes field defaults in generated toObject code | High | Also affects protobufjs |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor