CVE-2024-34402

8.6 HIGH

📋 TL;DR

This vulnerability in uriparser allows attackers to trigger an integer overflow when processing long query keys or values, leading to buffer overflow. This could enable remote code execution or denial of service attacks. Any application using vulnerable versions of uriparser to parse URIs is affected.

💻 Affected Systems

Products:
  • uriparser
Versions: All versions through 0.9.7
Operating Systems: All operating systems using uriparser
Default Config Vulnerable: ⚠️ Yes
Notes: Any application linking against uriparser and processing untrusted URI queries is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the application using uriparser, potentially leading to complete system compromise.

🟠

Likely Case

Denial of service through application crash, with potential for information disclosure via memory leaks.

🟢

If Mitigated

Application crash without code execution if memory protections like ASLR are enabled.

🌐 Internet-Facing: HIGH - Any internet-facing service parsing user-supplied URIs with uriparser is vulnerable.
🏢 Internal Only: MEDIUM - Internal applications processing untrusted URIs remain vulnerable.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting malicious URIs with long query parameters to trigger the overflow.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.9.8 and later

Vendor Advisory: https://github.com/uriparser/uriparser/issues/183

Restart Required: Yes

Instructions:

1. Update uriparser to version 0.9.8 or later. 2. Recompile any applications using uriparser. 3. Restart affected services.

🔧 Temporary Workarounds

Input validation

all

Implement strict length limits on URI query keys and values before passing to uriparser.

Disable vulnerable functionality

all

If possible, disable URI query parsing in affected applications.

🧯 If You Can't Patch

  • Implement network segmentation to isolate vulnerable systems
  • Deploy web application firewall with URI length restrictions

🔍 How to Verify

Check if Vulnerable:

Check if uriparser version is 0.9.7 or earlier using package manager or ldd/ldconfig.

Check Version:

pkg-config --modversion uriparser  # or check package manager

Verify Fix Applied:

Verify uriparser version is 0.9.8 or later and applications have been recompiled.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults
  • Unusually long URI queries in access logs

Network Indicators:

  • HTTP requests with extremely long query parameters
  • Multiple failed requests to URI parsing endpoints

SIEM Query:

source="web_logs" AND uri_query_length>1000

🔗 References

📤 Share & Export