{"id":"CVE-2025-59058","aliases":["CVE-2025-59058","GHSA-q7pg-9pr4-mrp2"],"related":[],"kind":"vulnerability","state":"published","title":"httpsig-rs's HMAC verification is vulnerable to timing attack","summary":"httpsig-rs is a Rust implementation of IETF RFC 9421 http message signatures. Prior to version 0.0.19, the HMAC signature comparison is not timing-safe. This makes anyone who uses HS256 signature verification vulnerable to a timing attack that allows the attacker to forge a signature. Version 0.0.19 fixes the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"httpsig-rs is a Rust implementation of IETF RFC 9421 http message signatures. Prior to version 0.0.19, the HMAC signature comparison is not timing-safe. This makes anyone who uses HS256 signature verification vulnerable to a timing attack that allows the attacker to forge a signature. Version 0.0.19 fixes the issue.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2025-09-12T13:10:11.349Z","modified":"2026-06-17T09:45:31.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-208"],"affected":[{"ranges":[{"version":"< 0.0.19","status":"affected"}],"vendor":"junkurihara","product":"httpsig-rs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.19"}],"ecosystem":"crates.io","package":"httpsig","purl":"pkg:cargo/httpsig","source":"ghsa"}],"references":[{"url":"https://github.com/junkurihara/httpsig-rs/security/advisories/GHSA-q7pg-9pr4-mrp2","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/junkurihara/httpsig-rs/commit/fc095b6ce6043bb808f5d9c4379cf697899cb458","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59058","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/junkurihara/httpsig-rs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-09-12T13:43:33.645Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59058","url":"https://www.cve.org/CVERecord?id=CVE-2025-59058","licence":"CVE Terms of Use","modified":"2025-09-12T13:45:48.203Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q7pg-9pr4-mrp2","url":"https://github.com/advisories/GHSA-q7pg-9pr4-mrp2","licence":"CC-BY-4.0","modified":"2025-09-12T22:13:24.081Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59058","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59058","licence":"Public domain","modified":"2026-06-17T09:45:31.167Z"}],"updatedAt":"2026-11-25T22:59:04.599Z","epss":{"score":0.00283,"percentile":0.22321,"date":"2026-12-01T12:00:22.000Z"}}