Hostname spoofing via backslash mishandling
Published Mar 11, 2022 · Updated Sep 16, 2024
Improper URL parsing in Dumitru Uzun URL.js before 2.1.0 allows remote attackers to spoof hostnames with backslash-prefixed URLs. The parseUrl regular expression treats backslashes after the scheme as hostname characters instead of authority or path separators, so a URL equivalent to localhost yields a non-local hostname. Exploitation requires a consuming application to apply security policy to the parsed hostname, allowing policy bypass when the URL resolves to a protected host.
Summary
What happened
Improper URL parsing in Dumitru Uzun URL.js before 2.1.0 allows remote attackers to spoof hostnames with backslash-prefixed URLs. The parseUrl regular expression treats backslashes after the scheme as hostname characters instead of authority or path separators, so a URL equivalent to localhost yields a non-local hostname. Exploitation requires a consuming application to apply security policy to the parsed hostname, allowing policy bypass when the URL resolves to a protected host.
The record
- CVE
- CVE-2022-25839
- Published
- Mar 11, 2022
- Updated
- Sep 16, 2024
- Vendor
- Dumitru Uzun
- Product
- URL.js
- Classifications
- CWE-20
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 11, 2022CVE publishedPublication date reported by the CVE source.
- Sep 16, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=unspecified <2.1.0
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Snyk hostname-spoofing proof of conceptproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo