Read the docs
TI-2021-16543 Aliases CVE-2021-39157GHSA-jqfh-8hw5-fqjr

Improper Handling of Exceptional Conditions in detect-character-encoding

Priority LOW 37CWE-755Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

EPSS 0.02068 81st percentileScored 2026-11-07
Public exploit Yes 2 exploit referencesTagged by NVD
Fix Fixed detect-character-encoding (sonicdoe): 0.7.0detect-character-encoding (npm): 0.7.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
sonicdoedetect-character-encodingbefore 0.7.00.7.0Patch availableCNA
—detect-character-encoding (npm)before 0.7.00.7.0Patch availableGHSA-jqfh-8hw5-fqjr
  • detect-character-encoding Vendorsonicdoe Affected before 0.7.0 Fixed in 0.7.0 Patch available CNA
  • detect-character-encoding (npm) Vendor— Affected before 0.7.0 Fixed in 0.7.0 Patch available GHSA-jqfh-8hw5-fqjr

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:detect-character-encoding_project:detect-character-encoding:*:*:*:*:*:node.js:*:*before 0.7.0VulnerableDetect-character-encoding Project

Remediation

  • Fix · CNA detect-character-encoding (sonicdoe) Fixed in 0.7.0
  • Fix · GHSA-jqfh-8hw5-fqjr detect-character-encoding (npm) Fixed in 0.7.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-39157
  2. 2026-10-03 Alias added: GHSA-jqfh-8hw5-fqjr

References

  • TI-2021-16562 Missing Release of Memory after Effective Lifetime in detect-character-encoding CVSS 3.1HIGH 7.5

Sources