All CVEs / Detect-character-encoding Project
CVE-2021-39157Detect-character-encoding Project Detect-character-encoding
High 7.5 No auth needed
Follow: this CVE · Detect-character-encoding Project · Detect-character-encoding Project Detect-character-encoding We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 82
- Auth required
- No
- Published
- Aug 24, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-755
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
detect-character-encoding is an open source character encoding inspection library. In detect-character-encoding v0.6.0 and earlier, data matching no charset causes the Node.js process to crash. The problem has been patched in [detect-character-encoding v0.7.0](https://github.com/sonicdoe/detect-character-encoding/releases/tag/v0.7.0). No workaround are available and all users should update to resolve this issue.
What to do
- Apply the vendor's security update for Detect-character-encoding.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | detect-character-encoding |
< 0.7.0 |
0.7.0 |
npm install detect-character-encoding@0.7.0 |
Per OSV / GitHub Advisories (GHSA-jqfh-8hw5-fqjr). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| detect-character-encoding_project | detect-character-encoding | < 0.7.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Exploit Third Party Advisory
- github.com Exploit Third Party Advisory