CVE-2022-1243: Incorrect protocol extraction via \r, \n and \t characters
7.2
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.54305%
CWE
Published
4/6/2022
Updated
11/29/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
urijs | npm | < 1.19.11 | 1.19.11 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from URI.parse()'s handling of URL parsing. The commit fix shows:
- Addition of a regex pattern (ascii_tab_whitespace) to detect control characters
- Modification of the parsing logic to strip these characters from input strings
- Test cases added for URLs containing CR/LF/TAB in protocols This demonstrates the vulnerable function was URI.parse() as it previously didn't sanitize these characters, allowing protocol confusion. The direct correlation between the vulnerability description and the patched code changes confirms this assessment.