CVE-2025-59058: httpsig-rs HMAC Verification Is Vulnerable To Vulnerability
MODERATECVE-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
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).
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.
Upgrade httpsig to 0.0.19
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
CVE-2025-59058 Affected httpsig-rs Versions
1 component(s)| 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?
Which httpsig-rs versions are affected?
What version fixes CVE-2025-59058?
Is httpsig affected?
What is the CVSS score of CVE-2025-59058?
What CWE is associated with CVE-2025-59058?
How can I check crates.io dependencies for CVE-2025-59058?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}