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-0691

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

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

Published: February 17, 2026

CVE-2022-0691 Overview

CVE-2022-0691 is an Authorization Bypass Through User-Controlled Key vulnerability affecting the NPM url-parse package prior to version 1.5.9. This widely-used JavaScript library for parsing URLs contains a flaw in how it handles control characters at the beginning of URL strings, enabling attackers to manipulate URL parsing behavior and potentially bypass security controls that rely on accurate URL validation.

Critical Impact

This vulnerability allows attackers to craft malicious URLs that bypass authorization checks by exploiting improper handling of control characters, potentially leading to Server-Side Request Forgery (SSRF), open redirects, or authentication bypass in applications relying on url-parse for URL validation.

Affected Products

  • url-parse_project url-parse (versions prior to 1.5.9)
  • Node.js applications using vulnerable url-parse versions
  • Web applications relying on url-parse for URL validation and sanitization

Discovery Timeline

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

Technical Details for CVE-2022-0691

Vulnerability Analysis

The vulnerability exists in the url-parse library's whitespace trimming functionality. The library failed to properly strip all control characters from the beginning of input URLs before parsing. This incomplete sanitization allows attackers to prepend specific control characters (bytes \\x00 through \\x1f) to URLs, causing the parser to misinterpret the URL structure and potentially return incorrect host, protocol, or path information.

When applications use url-parse for security decisions—such as validating that a redirect URL points to an allowed domain or ensuring an API request targets an approved host—this parsing inconsistency can be exploited to bypass those checks. The attacker crafts a URL with leading control characters that causes url-parse to return different results than what the browser or server would actually navigate to.

Root Cause

The root cause lies in the whitespace regular expression pattern used to strip leading characters from URLs. The original implementation used a pattern that only matched a limited set of whitespace characters ([ \f\n\r\t\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]), missing critical ASCII control characters in the \\x00-\\x1f range. This oversight allowed attackers to prepend control characters that would be stripped by browsers but not by url-parse, creating a parsing differential that could be exploited for authorization bypass.

Attack Vector

The attack leverages the network-accessible nature of web applications. An attacker with no authentication can submit crafted URLs containing leading control characters to any application endpoint that processes user-supplied URLs through the vulnerable url-parse library. The attack requires no user interaction and can be executed remotely with low complexity.

A typical attack scenario involves:

  1. Identifying an application that uses url-parse for URL validation
  2. Crafting a malicious URL with leading control characters (e.g., \\x00http://evil.com)
  3. Submitting this URL where the application validates the destination
  4. The url-parse library misparses the URL, allowing the attacker to bypass domain allowlists or redirect validation
javascript
// Security patch - Fix for control character handling
// Source: https://github.com/unshiftio/url-parse/commit/0e3fb542d60ddbf6933f22eb9b1e06e25eaa5b63

   , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
   , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
   , windowsDriveLetter = /^[a-zA-Z]:/
-  , whitespace = /^[ \f\n\r\t\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/;
+  , whitespace = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/;

 /**
  * Trim a given string.

Source: GitHub Commit Update

Detection Methods for CVE-2022-0691

Indicators of Compromise

  • HTTP requests containing URLs with unusual leading characters or null bytes
  • Log entries showing URL validation inconsistencies or unexpected redirect targets
  • Application errors related to URL parsing with malformed input
  • Unusual outbound connections from servers that perform URL-based operations

Detection Strategies

  • Implement Software Composition Analysis (SCA) tools to identify url-parse versions prior to 1.5.9 in your dependency tree
  • Monitor application logs for URLs containing control characters (\\x00-\\x1f) in user-submitted data
  • Deploy Web Application Firewall (WAF) rules to detect and block URLs with leading control characters
  • Use npm audit or similar dependency scanning to identify vulnerable packages in Node.js projects

Monitoring Recommendations

  • Enable verbose logging for URL validation and redirect functionality in affected applications
  • Set up alerts for unusual patterns in URL-related request parameters
  • Monitor for SSRF indicators such as internal IP addresses appearing in outbound request logs
  • Track dependency versions across your application portfolio to ensure timely patching

How to Mitigate CVE-2022-0691

Immediate Actions Required

  • Upgrade url-parse to version 1.5.9 or later immediately using npm update url-parse
  • Audit all applications using url-parse for URL validation in security-sensitive contexts
  • Implement additional input validation to strip control characters before URL parsing
  • Review application logs for potential exploitation attempts

Patch Information

The vulnerability has been addressed in url-parse version 1.5.9. The fix expands the whitespace regular expression to include all ASCII control characters (\\x00-\\x20) rather than just standard whitespace characters. This ensures that all potentially dangerous leading characters are stripped before URL parsing begins.

Patch details are available in the GitHub Commit Update. Additional information can be found in the Huntr Bounty Report.

Workarounds

  • Implement pre-processing to strip control characters from URLs before passing to url-parse
  • Use the native URL constructor available in modern Node.js versions as an alternative
  • Add server-side validation that normalizes URLs before security checks
  • Deploy WAF rules to reject requests containing URLs with leading control characters
bash
# Configuration example
# Update url-parse to patched version
npm install url-parse@1.5.9

# Alternatively, update to latest version
npm install url-parse@latest

# Verify the installed version
npm list url-parse

# Run npm audit to check for remaining vulnerabilities
npm audit

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

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-639
  • Technical References
  • Debian LTS Announcement

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Commit Update

  • Huntr Bounty Report
  • Related CVEs
  • CVE-2022-0512: 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