
Cloud Vulnerability DB
A community-led vulnerabilities database
detect-character-encoding is an open source character encoding inspection library that was found to have a vulnerability (CVE-2021-39157) in versions 0.6.0 and earlier. The vulnerability was discovered and disclosed on August 24, 2021, affecting the library's core functionality when handling data that doesn't match any charset (GitHub Advisory).
The vulnerability is classified as an Improper Handling of Exceptional Conditions (CWE-755). When the library encounters data that doesn't match any charset, it fails to properly handle the null return value from the underlying ICU library's ucsdet_detect() function, leading to a segmentation fault. The vulnerability has a CVSS v3.1 base score of 7.5 (High) and a temporal score of 7.2, indicating significant severity (GitHub Advisory).
When exploited, this vulnerability causes the Node.js process to crash, resulting in a denial of service condition. The impact is particularly severe in network-facing applications that accept untrusted input and pass it directly to detect-character-encoding (GitHub Advisory).
The vulnerability has been patched in detect-character-encoding version 0.7.0. The fix involves properly handling the null return value from ucsdet_detect() by returning null instead of attempting to access properties of the null object. Users should upgrade to version 0.7.0 or later to resolve this issue (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."