{"id":"CVE-2021-39176","published":"2021-08-31T18:05:12Z","modified":"2024-08-04T01:58:18Z","title":"Missing Release of Memory after Effective Lifetime in detect-character-encoding","vendor":"sonicdoe","product":"detect-character-encoding","tier":"tail","description":{"text":"detect-character-encoding is a package for detecting character encoding using ICU. In detect-character-encoding v0.3.0 and earlier, allocated memory is not released. The problem has been patched in detect-character-encoding v0.3.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01891,"percentile":0.80087,"provenance":"source"},"cwes":[{"id":"CWE-401","name":"Missing Release of Memory after Effective Lifetime"}],"references":[{"url":"https://github.com/sonicdoe/detect-character-encoding/security/advisories/GHSA-5rwj-j5m3-3chj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sonicdoe/detect-character-encoding/pull/6","tags":["x_refsource_MISC"]},{"url":"https://github.com/sonicdoe/detect-character-encoding/commit/d44356927b92e3b13e178071bf6d7c671766f588","tags":["x_refsource_MISC"]},{"url":"https://github.com/sonicdoe/detect-character-encoding/releases/tag/v0.3.1","tags":["x_refsource_MISC"]}],"priority":{"score":21.3,"factors":[{"name":"EPSS percentile","points":16.02},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"sonicdoe","affectedVersions":[{"vendor":"sonicdoe","product":"detect-character-encoding","versions":["< 0.3.1"]}],"affected":[{"ecosystem":"npm","package":"detect-character-encoding","vulnerableRanges":["<0.3.1"],"patched":["0.3.1"],"from":["GHSA-5rwj-j5m3-3chj"],"provenance":"source"}],"summary":{"text":"The detect-character-encoding package, a sonicdoe library that detects character encoding using ICU, fails to release allocated memory in versions 0.3.0 and earlier. An attacker with network access can trigger the leak without authentication or user interaction, exhausting memory and impairing availability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:08:16Z"},"euvd":{"id":"EUVD-2021-1986","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-sonicdoe-detect-character-encoding-cve-2021-39157","parents":[{"from":"CVE-2021-39157","to":"CVE-2021-39176","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["icuWrapper.cpp"],"commits":["https://github.com/sonicdoe/detect-character-encoding/commit/992a11007fff6cfd40b952150ab8d30410c4a20a","https://github.com/sonicdoe/detect-character-encoding/commit/d44356927b92e3b13e178071bf6d7c671766f588"],"basis":"shared function","functions":["NAN_METHOD"]}]}]}}