Loading...
Skip to main content

CVE-2025-59058 — Vulnerability in httpsig — CVE Details

MEDIUM

httpsig-rs: HMAC verification is vulnerable to timing attack

Published September 12, 2025Updated September 12, 2025Source: osv

Summary

### Summary HMAC signature comparison is not timing-safe and is vulnerable to timing attacks. ### Details `SharedKey::sign()` returns a `Vec<u8>` which has a non-constant-time equality implementation. `Hmac::finalize()` returns a constant-time wrapper ([`CtOutput`](https://docs.rs/digest/0.10.7/digest/struct.CtOutput.html)) which was discarded. Alternatively, `Hmac` has a constant-time `verify()` method. The problem reported here is due to the following lines in `SharedKey::sign()` of the previous code: ```rust let mut mac = HmacSha256::new_from_slice(key).unwrap(); mac.update(data); Ok(mac.finalize().into_bytes().to_vec()) ``` and the merged update changes the third line to directly verify with `verify_slice`. ### Impact Anyone who uses HS256 signature verification is vulnerably to Timing Attack that allows the attacker to forge a signature.

Advisory Timeline

  • First published September 12, 2025 (395 days ago).
  • Last revised September 12, 2025 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Cargo
Update httpsig to 0.0.19 or later
cargo update -p httpsig --precise 0.0.19

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: crates.io (1).

PackageEcosystemAffectedFixed In
httpsig
crates.io
All versions0.0.19

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Frequently Asked Questions

What is CVE-2025-59058?
httpsig-rs: HMAC verification is vulnerable to timing attack This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.9/10).
How do I check if my project is affected by CVE-2025-59058?
CVE-2025-59058 affects httpsig. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-59058 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.9

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-q7pg-9pr4-mrp2

Related CVEs

  • CVE-2026-102821
    MEDIUM

    Russh: Unbounded memory exhaustion via CHANNEL_OPEN flood during a client-stalled rekey

  • CVE-2026-102820
    MEDIUM

    pageant: Out-of-bounds read / oversized allocation in `pageant` MemoryMap::read via a malicious Pageant agent (Windows)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies