平台
python
组件
aiohttp
修复版本
3.13.5
3.13.4
CVE-2026-34520 描述了 aiohttp 库中一个头部注入漏洞,影响版本小于等于 3.9.5 的系统。该漏洞允许攻击者通过在响应头中注入控制字符,导致头部值的解析出现偏差,从而可能绕过安全机制。该漏洞已于 2026 年 4 月 1 日发布,建议用户尽快升级至 3.13.4 版本以修复此问题。
该漏洞的潜在影响非常严重。攻击者可以精心构造恶意的 HTTP 响应头,利用控制字符(如空字节或换行符)来操纵 request.url.origin() 等函数的行为。这可能导致应用程序错误地解析主机名或协议,从而实现安全绕过。例如,攻击者可能能够伪造请求,访问未经授权的资源,或者劫持会话。由于 aiohttp 广泛应用于 Python Web 应用程序中,该漏洞的潜在影响范围非常广,可能影响大量用户和系统。
目前,该漏洞的公开利用信息有限,但由于其严重程度和潜在影响,应予以高度关注。漏洞已发布,因此预计未来可能会出现更多利用尝试。建议密切关注安全社区的动态,及时获取最新的威胁情报。该漏洞的 CVSS 评分为 9.1(严重),表明其具有较高的风险。目前尚不清楚是否存在活跃的利用活动。
Applications built using aiohttp, particularly those deployed in production environments and handling sensitive data, are at risk. Services relying on accurate header parsing for authentication, authorization, or routing are especially vulnerable. Shared hosting environments where users have limited control over server configurations are also at increased risk.
• python / server:
import aiohttp
async def check_aiohttp_version():
try:
import aiohttp
print(f"aiohttp version: {aiohttp.__version__}")
if aiohttp.__version__ <= '3.9.5':
print("VULNERABLE: aiohttp version is less than or equal to 3.9.5")
else:
print("aiohttp version is not vulnerable.")
except ImportError:
print("aiohttp is not installed.")
if __name__ == '__main__':
import asyncio
asyncio.run(check_aiohttp_version())• generic web:
curl -I https://example.com | grep -i 'Content-Type:'Inspect the Content-Type header for unexpected characters or encodings that might indicate manipulation.
disclosure
漏洞利用状态
EPSS
0.06% (17% 百分位)
CVSS 向量
最有效的缓解措施是升级 aiohttp 库至 3.13.4 或更高版本。如果无法立即升级,可以考虑以下临时缓解措施:首先,在反向代理或 Web 服务器层面上,对传入的请求头进行严格的验证和过滤,移除或转义任何可疑的控制字符。其次,可以考虑使用 Web 应用程序防火墙 (WAF) 来检测和阻止包含恶意控制字符的请求。最后,仔细审查应用程序的代码,确保对请求头进行正确的解析和处理,避免因控制字符导致的安全问题。升级后,请验证新版本是否正确处理了头部信息,确保漏洞已成功修复。
Actualice la biblioteca AIOHTTP a la versión 3.13.4 o superior. Esto solucionará la vulnerabilidad de inyección de encabezado al rechazar bytes nulos y caracteres de control en los valores de los encabezados de respuesta. Puede actualizar usando `pip install -U aiohttp`.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2026-34520 描述了 aiohttp 库中一个头部注入漏洞,允许攻击者通过注入控制字符来操纵响应头,可能导致安全绕过。影响版本小于等于 3.9.5。
如果您正在使用 aiohttp 3.9.5 或更早版本,则可能受到此漏洞的影响。请立即检查您的版本并升级。
升级 aiohttp 库至 3.13.4 或更高版本是修复此漏洞的最佳方法。如果无法立即升级,请考虑使用 WAF 或反向代理进行缓解。
目前尚未发现大规模的利用活动,但由于漏洞的严重性,预计未来可能会出现利用尝试。建议保持警惕。
请访问 aio-libs/aiohttp GitHub 仓库的提交记录:https://github.com/aio-libs/aiohttp/commit/9370b9714a7a56003cacd31a9b4ae16eab109ba4
上传你的 requirements.txt 文件,立即知道是否受影响。