CVE-2022-0691

9.8 CRITICAL

📋 TL;DR

CVE-2022-0691 is an authorization bypass vulnerability in the url-parse npm package where attackers can manipulate URL parsing to bypass authorization controls. This affects any application using vulnerable versions of url-parse for URL parsing and authorization logic. The vulnerability allows attackers to access resources they shouldn't have permission to view or modify.

💻 Affected Systems

Products:
  • url-parse npm package
  • Applications using url-parse for URL parsing
Versions: All versions prior to 1.5.9
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Applications must use url-parse for parsing URLs that influence authorization decisions. The vulnerability is in the library itself, not dependent on specific configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through privilege escalation, allowing attackers to access sensitive data, modify critical configurations, or execute unauthorized administrative functions.

🟠

Likely Case

Unauthorized access to restricted application resources, data leakage, or modification of user-specific data through manipulated URL parameters.

🟢

If Mitigated

Limited impact with proper input validation and authorization checks independent of URL parsing, potentially resulting in failed exploitation attempts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires the attacker to craft specific URL parameters that bypass authorization checks. The vulnerability is well-documented with public proof-of-concept examples available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.5.9 and later

Vendor Advisory: https://github.com/unshiftio/url-parse/commit/0e3fb542d60ddbf6933f22eb9b1e06e25eaa5b63

Restart Required: No

Instructions:

1. Update url-parse dependency to version 1.5.9 or higher. 2. Run 'npm update url-parse' or update package.json to specify 'url-parse': '^1.5.9'. 3. Rebuild and redeploy affected applications.

🔧 Temporary Workarounds

Input Validation Workaround

all

Implement strict input validation for URL parameters before passing to url-parse

Authorization Bypass Protection

all

Add additional authorization checks independent of URL parsing results

🧯 If You Can't Patch

  • Implement Web Application Firewall (WAF) rules to detect and block malicious URL patterns
  • Isolate affected applications behind additional authentication layers and monitor for suspicious access patterns

🔍 How to Verify

Check if Vulnerable:

Check package.json or node_modules/url-parse/package.json for version number. Versions below 1.5.9 are vulnerable.

Check Version:

npm list url-parse | grep url-parse

Verify Fix Applied:

Verify url-parse version is 1.5.9 or higher using 'npm list url-parse' command.

📡 Detection & Monitoring

Log Indicators:

  • Unusual URL patterns with special characters in authorization endpoints
  • Failed authorization attempts followed by successful access with modified URLs
  • Access to restricted resources from unexpected user contexts

Network Indicators:

  • HTTP requests with manipulated URL parameters containing special characters or unexpected structures
  • Requests bypassing normal authentication flows

SIEM Query:

source="web_server" AND (url="*@*" OR url="*#*" OR url="*?*" OR url="*&*") AND (status=200 OR status=302) AND resource="*/admin*" OR resource="*/restricted*"

🔗 References

📤 Share & Export