Skip to content

Divide by Zero DoS

High
0x676e67 published GHSA-7h24-c332-p48c Jul 30, 2025

Package

cargo vproxy (Rust)

Affected versions

<= 2.3.3

Patched versions

None

Description

Summary

Untrusted, user-controlled data from the HTTP Proxy-Authorization header can induce a denial of service state.

Details

Untrusted data is extracted from the user-controlled HTTP Proxy-Authorization header and passed to Extension::try_from and flows into parse_ttl_extension where it is parsed as a TTL value. If an attacker supplies a TTL of zero (e.g. by using a username such as 'configuredUser-ttl-0'), the modulo operation 'timestamp % ttl' will cause a division by zero panic, causing the server to crash causing a denial-of-service.

The code assumed to be responsible for this can be found here:

vproxy/src/extension.rs

Lines 173 to 183 in ab304c3

/// `Extensions::None`.
#[inline(always)]
fn parse_ttl_extension(s: &str) -> Extension {
if let Ok(ttl) = s.parse::<u64>() {
let start = SystemTime::now();
let timestamp = start
.duration_since(UNIX_EPOCH)
.map(|d| d.as_secs())
.unwrap_or(rand::random());
let time = timestamp - (timestamp % ttl);

PoC

  1. Download and run the latest version of vproxy
  2. Send a cUrl request like the following, adjusting address and port as necessary: curl -x "http://test-ttl-0:[email protected]:8101" https://google.com
  3. Wait for a cUrl error indicating "Proxy CONNECT aborted"
  4. View logs from the vproxy server
  5. Observe that the vproxy server crashed due to a divide-by-zero panic

Impact

The resulting crash renders the proxy server unusable until it is reset.

Finally, one last note: I'm reporting this on behalf of another researcher at Black Duck. Credit for discovery should be attributed to David Bohannon (dbohannon)

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2025-54581

Weaknesses

Divide By Zero

The product divides a value by zero. Learn more on MITRE.

Credits