REDHAT-BUG-2442232: Medium severity libsoup/libsoup vulnerability
DESCRIPTION
Here, I had found another flaw in Libsoup's server-side digest authentication implementation. The SoupAuthDomainDigest class fails to track issued nonces or enforce the incrementing nonce-count (nc) attribute required by the Digest Auth standard. The validation logic in checkhexurp performs a purely mathematical verification. It recomputes the expected hash without verifying if the nonce was actually generated by the server or if the nc value is being reused. This allows an attacker who captures a single valid Authorization header to replay it indefinitely, bypassing authentication and accessing protected resources as the victim.
VULNERABILITY DETAILS
The vulnerability exists in libsoup/server/soup-auth-domain-digest.c due to a "stateless" design choice that violates security standard. -Stateless Validation: The function checkhexurp validates the response hash but fails to check against a store of active, issued nonces. -Missing Nonce-Count Check (The Main Flaw): RFC 7616 explicitly states that the server MUST verify that the nc (nonce-count) value increases for each request using the same nonce. In soup-auth-domain-digest.c (around lines 265-), the code parses the nonce count:
noncecount = strtoul (nc, NULL, 16); if (noncecount <= 0) return FALSE;
Here, it do checks that noncecount is positive, but it never compares it to a previously seen value for that nonce. It simply accepts any positive integer, allowing attackers to reuse nc=00000001 infinitely. -Insecure Nonce Generation: Nonces are generated using time(0) and the message pointer address. They are not cryptographically signed (HMAC) and are never expired by the server, creating an infinite window for replay attacks.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2442232?
The severity of REDHAT-BUG-2442232 is classified as medium, with a score of 4.
How do I fix REDHAT-BUG-2442232?
To fix REDHAT-BUG-2442232, update to the latest version of Libsoup that addresses the nonce tracking flaw.
What is the impact of REDHAT-BUG-2442232?
The impact of REDHAT-BUG-2442232 includes potential unauthorized access due to improper nonce handling in server-side digest authentication.
Which software is affected by REDHAT-BUG-2442232?
The software affected by REDHAT-BUG-2442232 is Libsoup.
What does REDHAT-BUG-2442232 exploit?
REDHAT-BUG-2442232 exploits the failure of the SoupAuthDomainDigest class to track issued nonces in compliance with the Digest Auth standard.