CVE-2026-26275 Overview
A critical integrity verification bypass vulnerability was discovered in httpsig-hyper, a Rust-based hyper extension for HTTP message signatures. The flaw exists in versions prior to 0.0.23 where Digest header verification could incorrectly succeed due to misuse of Rust's matches! macro. The comparison if matches!(digest, _expected_digest) treated _expected_digest as a pattern binding rather than performing an actual value comparison, resulting in unconditional success of the match expression regardless of the actual digest values.
Critical Impact
Applications relying on Digest verification as part of HTTP message signature validation may fail to detect message body modification, potentially allowing attackers to tamper with HTTP request bodies undetected.
Affected Products
- httpsig-hyper versions prior to 0.0.23
- Applications using httpsig-hyper for HTTP message signature validation
- Rust web services implementing HTTP Digest header verification via this library
Discovery Timeline
- 2026-02-19 - CVE-2026-26275 published to NVD
- 2026-02-19 - Last updated in NVD database
Technical Details for CVE-2026-26275
Vulnerability Analysis
This vulnerability stems from a subtle but critical misunderstanding of Rust's matches! macro semantics. The macro is designed for pattern matching, not value comparison. When the code used if matches!(digest, _expected_digest), Rust interpreted _expected_digest as a wildcard pattern binding (similar to _ which matches anything), rather than comparing it against the variable of the same name. This programming error resulted in the digest verification always returning success, completely bypassing the integrity check.
The impact is significant for applications that rely on HTTP message signatures for security guarantees. An attacker could modify the body of an HTTP request after it has been signed, and the tampered request would still pass digest verification. This undermines the fundamental security properties that HTTP message signatures are designed to provide—specifically, message integrity and non-repudiation.
Root Cause
The root cause is improper use of Rust's matches! macro for value comparison. In Rust, identifiers prefixed with an underscore (like _expected_digest) in pattern matching contexts are treated as bindings that match any value and discard it. The developer likely intended to compare the computed digest against an expected value, but the macro syntax caused an unconditional match instead. This represents CWE-354: Improper Validation of Integrity Check Value.
Attack Vector
The attack vector is network-based and requires no authentication or user interaction. An attacker capable of intercepting or modifying HTTP traffic can:
- Intercept a legitimately signed HTTP request
- Modify the request body to contain malicious content
- Forward the tampered request to the target server
- The server's digest verification incorrectly passes, accepting the modified content
This is particularly dangerous in scenarios where HTTP message signatures are used for API authentication, webhook verification, or any security-critical message integrity validation.
The vulnerable code and its fix are shown below:
// Vulnerable code - matches! macro treats _expected_digest as a wildcard pattern
if matches!(digest, _expected_digest) {
// This ALWAYS succeeds regardless of actual values
let new_body = Full::new(body_bytes).map_err(|never| match never {}).boxed();
let res = Request::from_parts(header, new_body);
Ok(res)
}
// Fixed code - proper value comparison
if digest == _expected_digest {
// This correctly compares the computed digest with expected value
let new_body = Full::new(body_bytes).map_err(|never| match never {}).boxed();
let res = Request::from_parts(header, new_body);
Ok(res)
}
Source: GitHub Commit Fix
Detection Methods for CVE-2026-26275
Indicators of Compromise
- HTTP requests with modified bodies that pass signature validation when they should fail
- Discrepancies between logged request bodies and expected content based on signatures
- Unexpected behavior in applications receiving HTTP signed requests with tampered payloads
- Audit logs showing accepted requests with mismatched Digest header values
Detection Strategies
- Review application dependencies to identify usage of httpsig-hyper versions prior to 0.0.23
- Implement secondary integrity verification at the application layer to detect bypass attempts
- Deploy network monitoring to identify requests with suspicious body modifications
- Add logging at the digest verification stage to capture both computed and expected values for comparison
Monitoring Recommendations
- Enable verbose logging for HTTP message signature validation operations
- Monitor for applications processing unexpected or malformed request bodies
- Implement application-level checksums for critical API payloads as a defense-in-depth measure
- Alert on any discrepancies between Digest header claims and actual body content at network inspection points
How to Mitigate CVE-2026-26275
Immediate Actions Required
- Upgrade to httpsig-hyper version 0.0.23 or later immediately
- Audit applications using affected versions to identify potential exploitation
- Review logs for any evidence of tampered HTTP requests that may have been accepted
- Implement additional signature validation layers until patching is complete
Patch Information
The vulnerability has been fixed in httpsig-hyper version 0.0.23. The fix replaces the incorrect matches! usage with proper value comparison using the equality operator (==). Additionally, constant-time comparison has been introduced for digest verification as a defense-in-depth measure against timing attacks. Regression tests have been added to prevent reintroduction of this issue.
For detailed patch information, see:
Workarounds
- There is no reliable workaround without upgrading to the patched version
- Avoid relying solely on Digest verification for message integrity validation
- Ensure full HTTP message signature verification is enforced at the application layer as an additional check
- Implement application-level body validation or checksums as a temporary mitigation
# Cargo.toml - Upgrade to patched version
[dependencies]
httpsig = { version = "0.0.23" }
httpsig-hyper = { version = "0.0.23" }
Source: GitHub Commit Update
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

