CVE-2025-59058: httpsig-rs HMAC Verification Is Vulnerable To Vulnerability

MODERATE
Advisory Identifier: GHSA-q7pg-9pr4-mrp2
CVSS 5.9
CWE-208
Published
Advisory Summary

CVE-2025-59058 is a MODERATE (CVSS 5.9) hmac verification is vulnerable to vulnerability (CWE-208: Observable Timing Discrepancy) affecting httpsig-rs libraries in the crates.io ecosystem. The issue involves hmac verification is vulnerable to timing attack. Remediation is available by upgrading affected packages to version 0.0.19.

CVE-2025-59058 at a Glance

CVE Identifier CVE-2025-59058
GHSA Identifier GHSA-q7pg-9pr4-mrp2
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product httpsig-rs
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-59058

To remediate this vulnerability, upgrade all affected httpsig-rs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

httpsig fixed: 0.0.19
Upgrade httpsig to 0.0.19
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for httpsig

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-59058, inspect your project dependencies for httpsig-rs:

inspect dependencies for httpsig

Analyze the terminal output to locate any version of httpsig-rs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.19), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In httpsig-rs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2025-59058 Affected httpsig-rs Versions

1 component(s)
Fixed Versions:
0.0.19
Product / Package Ecosystem Affected Versions Fixed Version
httpsig
crates.io
< 0.0.19
0.0.19

References

Frequently Asked Questions

What is CVE-2025-59058?
CVE-2025-59058 is a security vulnerability in httpsig-rs involving HMAC verification is vulnerable to timing attack under CWE-208: Observable Timing Discrepancy.
Which httpsig-rs versions are affected?
Affected versions include releases prior to 0.0.19 across affected packages: httpsig.
What version fixes CVE-2025-59058?
Upgrading to 0.0.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is httpsig affected?
Yes, httpsig is affected in releases prior to 0.0.19. Upgrade your dependency to 0.0.19 or later.
What is the CVSS score of CVE-2025-59058?
CVE-2025-59058 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2025-59058?
CVE-2025-59058 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check crates.io dependencies for CVE-2025-59058?
Run the dependency tree command: 'inspect dependencies for httpsig'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q7pg-9pr4-mrp2",
  "modified" : "2025-09-12T21:11:13Z",
  "published" : "2025-09-12T21:11:13Z",
  "aliases" : [ "CVE-2025-59058" ],
  "summary" : "httpsig-rs: HMAC verification is vulnerable to timing attack",
  "details" : "### Summary\nHMAC signature comparison is not timing-safe and is vulnerable to timing attacks.\n\n### Details\n`SharedKey::sign()` returns a `Vec<u8>` which has a non-constant-time equality implementation.\n\n`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.\n\nThe problem reported here is due to the following lines in `SharedKey::sign()` of the previous code:\n```rust\nlet mut mac = HmacSha256::new_from_slice(key).unwrap();\nmac.update(data);\nOk(mac.finalize().into_bytes().to_vec())\n```\nand the merged update changes the third line to directly verify with `verify_slice`.\n\n### Impact\n\nAnyone who uses HS256 signature verification is vulnerably to Timing Attack that allows the attacker to forge a signature.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "httpsig"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.19"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/junkurihara/httpsig-rs/security/advisories/GHSA-q7pg-9pr4-mrp2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59058"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/junkurihara/httpsig-rs/commit/fc095b6ce6043bb808f5d9c4379cf697899cb458"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/junkurihara/httpsig-rs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-12T21:11:13Z",
    "nvd_published_at" : "2025-09-12T14:15:41Z"
  }
}