Uncaught Exception Affecting yaml package, versions >=2.0.0-4 <2.2.2 >=2.3.0-0 <2.3.0-5
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.12% (47th
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-YAML-5458867
- published 24 Apr 2023
- disclosed 24 Apr 2023
- credit Nazar Vinnichuk
Introduced: 24 Apr 2023
CVE-2023-2251 Open this link in a new tabHow to fix?
Upgrade yaml
to version 2.2.2, 2.3.0-5 or higher.
Overview
Affected versions of this package are vulnerable to Uncaught Exception due to improper validation of the input passed to the functions parseDocument
and parseAllDocuments
.
Exploiting this vulnerability is possible when these functions are fed an invalid input with more than 80 carriage return characters (\r
).
PoC
const yaml = require("yaml");
const string = "[" + "\r".repeat(80);
yaml.parseDocument(string);
References
CVSS Scores
version 3.1