CVE-2026-118766 in Botan
Summary
by MITRE • 10/29/2026
Botan is a C++ cryptography library. Prior to 3.13.0, Botan's online OCSP client allowed a single HTTP redirect while posting an OCSP request to the URI in a certificate's Authority Information Access extension. A malicious OCSP responder or an on-path attacker could redirect the client to make one blind request to an otherwise unreachable internal HTTP service. The primary impact is blind SSRF that might affect internal services with non-idempotent GET handlers, and response timing can provide a coarse internal-service oracle. This issue is fixed in version 3.13.0.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 10/29/2026
The Botan cryptography library, widely utilized for its robust implementation of cryptographic primitives in C++ applications, contained a significant security flaw in its online Online Certificate Status Protocol client prior to version 3.13.0. This vulnerability stems from the way the OCSP responder handles HTTP redirects during the process of fetching certificate revocation status. Specifically, when an application queries an OCSP responder using the URI found in a certificate's Authority Information Access extension, the library permitted exactly one HTTP redirect. While allowing a single redirect is often necessary for operational flexibility as resolvers may change their endpoints due to load balancing or infrastructure changes, this specific implementation failed to adequately validate the destination of that redirect against security policies regarding internal network access.
The core technical flaw lies in the lack of strict URL validation after following the initial HTTP 3xx response code. A malicious OCSP responder, configured by an attacker who controls a certificate's issuer information or intercepts traffic via man-in-the-middle techniques, can issue a redirect pointing to an arbitrary Uniform Resource Identifier. Because Botan blindly follows this single redirect without checking if the target address belongs to private IP ranges such as RFC 1918 addresses (e.g., 10.x.x.x, 172.16-31.x.x, or 192.168.x.x), it effectively facilitates a Server-Side Request Forgery attack. This SSRF is blind in nature because the application typically does not return the content of the redirected request to the user; instead, it only processes the final status code and certificate validity information returned by the internal service or the attacker's proxy.
The operational impact of this vulnerability extends beyond simple network reconnaissance. By directing the Botan client toward internal services that are otherwise inaccessible from external networks, an attacker can probe for the existence and behavior of these services. The primary risk arises when targeting internal HTTP endpoints with non-idempotent GET handlers or those sensitive to timing variations. Although the SSRF is blind, meaning direct data exfiltration through response bodies is not possible in this specific context, the ability to trigger requests allows an attacker to perform coarse-grained oracle attacks. By measuring the time it takes for the OCSP check to complete, an attacker can infer whether a request reached a live service or was dropped by a firewall, effectively mapping internal network topology and identifying active hosts behind firewalls that should remain hidden from external entities.
This vulnerability aligns with CWE-918, which describes Server-Side Request Forgery (SSRF) flaws where the server makes requests to unintended destinations due to insufficient validation of user-supplied input or redirect targets. Furthermore, it relates to ATT&CK technique T1557, Adversary-in-the-Middle, as an on-path attacker can exploit this flaw to intercept and manipulate OCSP responses for their own malicious purposes. The exploitation scenario typically involves the victim application performing a routine certificate validation check, which triggers the Botan library to fetch status information from a compromised or controlled responder that then redirects the request inward toward critical infrastructure such as database servers, internal APIs, or management consoles.
To mitigate this risk, organizations relying on versions of Botan prior to 3.13.0 must upgrade immediately to version 3.13.0 or later, where the issue has been resolved by implementing stricter validation rules for redirect targets. In environments where upgrading is not immediately feasible, defensive measures should include deploying network-level controls such as egress filtering on servers running affected applications to block outbound connections to private IP ranges during OCSP checks. Additionally, application developers can implement custom OCSP responders or wrappers that validate the final URL against a whitelist of allowed domains and reject any requests targeting internal address spaces before passing them to the underlying library logic. Regular security audits of cryptographic libraries are essential to ensure they adhere to modern best practices for handling external inputs and network redirections securely.