HIGH 7.5

CVE-2026-54275: AIOHTTP TLS SNI Validation Bypass via Connection Reuse

AIOHTTP, a popular Python framework for asynchronous HTTP communication, has a TLS validation weakness in versions before 3.14.1. When applications reuse connections to the same domain while changing the server_hostname parameter between requests, the library may incorrectly allow connections that should be rejected. This means an attacker could potentially intercept traffic if they control the network path and the application is configured to use different hostnames for the same connection pool.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-297
Affected products
1 configuration(s)
Published / Modified
2026-06-22 / 2026-06-26

NVD description (verbatim)

AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to 3.14.1, the server_hostname TLS SNI check can be bypassed when an existing connection is reused. If an application makes multiple requests to the same domain, but with different per-request server_hostname parameters, then the later calls may succeed by reusing the existing connection when they should have been rejected due to the TLS SNI check. This vulnerability is fixed in 3.14.1.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in AIOHTTP's server_hostname TLS SNI (Server Name Indication) check. When a persistent connection is reused across multiple requests, the library fails to re-validate the SNI parameter if it differs from the original connection's hostname. This breaks the expected security model where each request can specify its own server_hostname for TLS verification. The flaw is rooted in CWE-297 (Improper Validation of Certificate with Host Mismatch), allowing bypass of certificate hostname verification under connection reuse scenarios. Applications that make multiple requests to the same IP or domain while varying the server_hostname parameter in their request configuration are vulnerable.

Business impact

For organizations using AIOHTTP in production, this vulnerability could enable man-in-the-middle (MITM) attacks in scenarios where connection pooling is enabled and multiple hostnames are used against shared infrastructure. The risk is highest in microservices architectures, API gateways, and client applications that connect to multiple TLS endpoints through the same underlying socket. A successful exploit would compromise confidentiality and integrity of HTTP traffic, potentially exposing sensitive data or allowing attackers to modify responses. However, exploitation requires specific application patterns and network positioning, limiting the immediate blast radius.

Affected systems

AIOHTTP versions prior to 3.14.1 are affected. This includes all 3.x versions up to and including 3.14.0, and any earlier major versions. The vulnerability affects both the server and client components when connection reuse is active. Python applications relying on AIOHTTP for HTTP communication—particularly those using asyncio patterns with persistent connections—should be evaluated for exploitation risk based on whether they vary server_hostname across requests.

Exploitability

While the vulnerability is technically exploitable without user interaction (network-based, low complexity), real-world exploitation requires specific conditions: the target application must reuse connections, vary server_hostname parameters, and be positioned such that an attacker can intercept network traffic. The attack surface is limited to applications with this exact usage pattern. AIOHTTP is not in the KEV catalog, suggesting limited evidence of active exploitation in the wild to date. However, the ease of triggering the flaw programmatically makes this a concern for forward-looking threat actors.

Remediation

Upgrade AIOHTTP to version 3.14.1 or later. This patch addresses the TLS SNI validation logic to ensure server_hostname checks are enforced even when connections are reused. Organizations should prioritize patching development and production environments where AIOHTTP processes sensitive data or handles authentication tokens. No workarounds exist short of disabling connection pooling, which would degrade performance significantly.

Patch guidance

Apply the vendor patch to AIOHTTP 3.14.1 or later through your dependency manager (pip, poetry, etc.). Verify the upgrade in your requirements.txt, setup.py, or equivalent by running 'pip show aiohttp' to confirm the installed version. If your application uses pinned versions, update the constraint accordingly. Test thoroughly in staging environments, especially if your application employs custom connection pooling or SNI configurations. Consider automating this update in your CI/CD pipeline to prevent regression.

Detection guidance

Monitor AIOHTTP version inventory across your codebase and deployments. Search dependency manifests (requirements.txt, pyproject.toml, Pipfile) for aiohttp < 3.14.1. Implement application logging to track server_hostname parameters in outgoing TLS connections and flag instances where the same connection services multiple hostnames. Network-level detection is difficult; focus on inventory and code review to identify vulnerable patterns where server_hostname varies per request on a shared connection pool.

Why prioritize this

This vulnerability carries a HIGH CVSS score (7.5) driven by its network-exploitable nature and potential for availability/integrity impact. However, prioritization should be tempered by the fact that exploitation requires specific application architecture patterns and network positioning. Organizations should treat this as a near-term patch, but the urgency is lower than vulnerabilities affecting default configurations or widely used features. Given the absence from the KEV catalog, focus on applications that explicitly use varying server_hostname parameters or proxy-like functionality.

Risk score, explained

The CVSS 3.1 score of 7.5 (HIGH) reflects an Attack Vector of Network, Attack Complexity of Low, requiring no Privileges or User Interaction, with no scope change. The impact assessment shows no Confidentiality or Integrity loss in the base vector, but Availability is rated as High. This appears to reflect the library's behavior under connection exhaustion or denial-of-service scenarios rather than direct data exposure. Organizations handling high-value transaction data should consider this a functional security control bypass and elevate internal risk scores accordingly.

Frequently asked questions

Does this vulnerability affect all AIOHTTP deployments?

No. The vulnerability only manifests when an application reuses connections and varies the server_hostname parameter across requests to the same domain. Applications that use a single, static server_hostname per connection pool or do not enable connection pooling are not at risk.

Is there an active exploit in the wild?

AIOHTTP CVE-2026-54275 is not listed in the CISA KEV catalog, indicating no known active exploitation at this time. However, the flaw is straightforward to exploit programmatically, so proactive patching is still recommended.

Can we work around this without upgrading?

Technically, disabling HTTP connection pooling would prevent reuse and close the attack window, but this would severely degrade application performance. Upgrading to 3.14.1 is the only practical remediation.

What types of applications should prioritize patching?

API gateways, microservice clients connecting to multiple backends, web scrapers, and reverse proxy implementations should prioritize this patch. Applications that make authenticated requests or handle sensitive data over HTTPS should be patched within your standard critical-patch window.

This analysis is provided for informational purposes to support security decision-making. The vulnerability details, CVSS score, affected versions, and patch availability are based on vendor advisories and CVE records published as of the analysis date. Organizations should verify patch availability and compatibility against their specific AIOHTTP deployments and consult official vendor documentation. No liability is assumed for decisions made based on this analysis. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).