Improper Control of Resources Affecting detect-character-encoding package, versions <0.3.1
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.31% (71st
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-DETECTCHARACTERENCODING-1579267
- published 1 Sep 2021
- disclosed 1 Sep 2021
- credit Unknown
Introduced: 1 Sep 2021
CVE-2021-39176 Open this link in a new tabHow to fix?
Upgrade detect-character-encoding
to version 0.3.1 or higher.
Overview
detect-character-encoding is a Detect character encoding using ICU.
Affected versions of this package are vulnerable to Improper Control of Resources. Missing closure of charsetDetector
leads to a memory leak.
PoC
const express = require("express");
const detectCharacterEncoding = require("detect-character-encoding");
const app = express();
app.get("/", (req, res) => {
detectCharacterEncoding(Buffer.from("somewhere"));
res.end();
});
app.listen(3000);
References
CVSS Scores
version 3.1