The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-0512

CVE-2022-0512: Url-parse Auth Bypass Vulnerability

CVE-2022-0512 is an authorization bypass flaw in NPM url-parse that allows attackers to circumvent authentication through user-controlled keys. This article covers technical details, affected versions, impact, and mitigation.

Published: February 17, 2026

CVE-2022-0512 Overview

CVE-2022-0512 is an Authorization Bypass Through User-Controlled Key vulnerability affecting the url-parse NPM package prior to version 1.5.6. This popular JavaScript library is used for parsing URLs in Node.js applications, and the vulnerability allows attackers to manipulate URL parsing logic through specially crafted URLs containing the @ character in the userinfo portion.

Critical Impact

Attackers can craft malicious URLs that bypass authorization controls by manipulating how the url-parse library interprets the hostname and userinfo components, potentially leading to open redirect attacks or server-side request forgery (SSRF) in applications that rely on this library for URL validation.

Affected Products

  • url-parse NPM package versions prior to 1.5.6
  • Node.js applications using vulnerable url-parse versions
  • Web applications relying on url-parse for URL validation and parsing

Discovery Timeline

  • 2022-02-14 - CVE-2022-0512 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-0512

Vulnerability Analysis

This vulnerability is classified as CWE-639 (Authorization Bypass Through User-Controlled Key). The flaw exists in how the url-parse library handles URLs containing the @ character within the userinfo portion. The library incorrectly uses indexOf() to find the @ delimiter, which returns the first occurrence. When a URL contains multiple @ characters, this can lead to incorrect parsing of the hostname.

For example, a URL like http://attacker.com%40legitimate.com@malicious.com/ would be incorrectly parsed, potentially causing applications to believe they are connecting to legitimate.com when the actual destination is malicious.com. This parsing discrepancy can be exploited to bypass URL-based authorization checks, access controls, or allowlist validations.

Root Cause

The root cause lies in the URL parsing logic that uses indexOf('@') to locate the userinfo delimiter. Since indexOf() returns the position of the first occurrence of a character, URLs containing multiple @ characters (including URL-encoded %40) are parsed incorrectly. The hostname extraction logic would stop at the wrong delimiter, causing the parsed hostname to differ from the actual destination server.

Attack Vector

This vulnerability is exploitable over the network without authentication. Attackers can craft malicious URLs and submit them to applications that use the vulnerable url-parse library for URL validation. The attack is particularly effective against:

  • Open redirect prevention mechanisms
  • SSRF protection filters
  • URL allowlist/blocklist implementations
  • OAuth redirect URI validation

The fix changes the parsing logic to use lastIndexOf('@') instead of indexOf('@') when parsing the userinfo portion, ensuring the correct delimiter is identified:

javascript
     if (parse !== parse) {
       url[key] = address;
     } else if ('string' === typeof parse) {
-      if (~(index = address.indexOf(parse))) {
+      index = parse === '@'
+        ? address.lastIndexOf(parse)
+        : address.indexOf(parse);
+
+      if (~index) {
         if ('number' === typeof instruction[2]) {
           url[key] = address.slice(0, index);
           address = address.slice(index + instruction[2]);

Source: GitHub Commit 9be7ee88afd2bb04e4d5a1a8da9a389ac13f8c40

Detection Methods for CVE-2022-0512

Indicators of Compromise

  • HTTP requests containing URLs with multiple @ characters or URL-encoded %40 sequences
  • Unusual redirect patterns where the logged destination differs from the actual destination
  • Application logs showing hostname parsing discrepancies
  • Requests to unexpected external domains following URL validation

Detection Strategies

  • Implement software composition analysis (SCA) tools to identify vulnerable url-parse versions in your dependency tree
  • Use npm audit or yarn audit to detect known vulnerabilities in JavaScript dependencies
  • Monitor application logs for URLs containing multiple @ characters in the userinfo portion
  • Deploy web application firewall (WAF) rules to detect URL manipulation attempts

Monitoring Recommendations

  • Review npm package lock files (package-lock.json or yarn.lock) for url-parse versions below 1.5.6
  • Implement continuous dependency scanning in CI/CD pipelines
  • Monitor for security advisories related to url-parse and similar URL parsing libraries
  • Set up alerts for unusual URL patterns in request logs

How to Mitigate CVE-2022-0512

Immediate Actions Required

  • Upgrade url-parse to version 1.5.6 or later immediately
  • Run npm audit fix or yarn upgrade url-parse to update the package
  • Review applications that use url-parse for URL validation or parsing logic
  • Audit any URL-based authorization controls that rely on url-parse

Patch Information

The vulnerability has been fixed in url-parse version 1.5.6. The patch modifies the parsing logic to correctly handle URLs containing multiple @ characters by using lastIndexOf('@') for userinfo parsing. For detailed information, see the GitHub Commit Change and the Huntr Bug Bounty Report. Debian users should also refer to the Debian LTS Security Announcement.

Workarounds

  • If immediate upgrade is not possible, implement additional URL validation at the application layer before passing URLs to url-parse
  • Use URL validation regex patterns to reject URLs containing multiple @ characters
  • Consider using the built-in URL class in modern Node.js versions as an alternative to url-parse
  • Implement allowlist validation on parsed hostnames using a secondary parsing method
bash
# Update url-parse to the patched version
npm update url-parse@1.5.6

# Or using yarn
yarn upgrade url-parse@1.5.6

# Verify the installed version
npm list url-parse

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechUrl Parse

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-639
  • Technical References
  • Debian LTS Security Announcement
  • Vendor Resources
  • GitHub Commit Change

  • Huntr Bug Bounty Report
  • Related CVEs
  • CVE-2022-0691: Url-parse Auth Bypass Vulnerability

  • CVE-2021-3664: Url-parse URL Redirection Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English