CVE-2026-35536是Tornado框架中存在的一个Cookie属性注入漏洞。由于.RequestHandler.set_cookie函数对domain、path和samesite参数没有进行充分的检查,攻击者可以注入恶意字符,从而导致安全问题。该漏洞影响Tornado 6.5.5之前的版本。此问题已在Tornado 6.5.5版本中修复。
CVE-2026-35536 影响 Tornado 6.5.5 之前的版本,使 Web 应用程序容易受到 Cookie 属性注入漏洞的影响。此缺陷是由于 RequestHandler.set_cookie 函数未能正确验证 domain、path 和 samesite 参数中的特殊字符造成的。攻击者可能操纵这些参数将恶意代码注入到 Cookie 中,从而导致身份盗窃、敏感信息盗窃或用户浏览器中执行任意代码。CVSS 严重性评级为 7.2,表明风险较高。缺乏验证允许插入可以更改 Cookie 预期行为的字符,从而损害应用程序安全。
攻击者可以通过发送包含 domain、path 或 samesite 参数中恶意字符的精心制作的 HTTP 请求来利用此漏洞,从而设置 Cookie。例如,他们可以将 HTML 或 JavaScript 标签注入到 domain 属性中,以在用户浏览器中执行代码。成功的利用需要应用程序在没有适当输入验证的情况下使用 RequestHandler.set_cookie 函数。利用的影响可能因应用程序配置和受影响用户的权限而异。缺乏适当的验证为跨站点脚本 (XSS) 攻击和其他与 Cookie 操纵相关的攻击打开了大门。
Applications built using Tornado, particularly those handling sensitive user data or financial transactions, are at risk. Web applications relying heavily on cookies for authentication and session management are especially vulnerable. Development teams using older versions of Tornado (≤6.5b1) should prioritize upgrading to the patched version.
• python / server:
import re
# Check for suspicious characters in cookie attributes
log_pattern = re.compile(r'Cookie: .*?(?:domain=[^\s;]+|path=[^\s;]+|samesite=[^\s;]+).*?[\x00-\x1F]')
# Analyze server logs for matches• generic web:
curl -I 'http://your-tornado-app.com/' | grep 'Cookie:'• generic web:
# Check for unusual characters in cookie attributes in access logs
grep -i 'domain=[^;]*[\x00-\x1F][^;]*' /var/log/apache2/access.logdisclosure
漏洞利用状态
EPSS
0.05% (15% 百分位)
CISA SSVC
减轻 CVE-2026-35536 的方法是将 Tornado 更新到 6.5.5 或更高版本。此版本包含安全修复程序,可验证 RequestHandler.setcookie 函数中的 domain、path 和 samesite 参数,从而防止 Cookie 属性注入。此外,请检查您的应用程序代码,以识别和更正任何可能存在漏洞的 setcookie 函数的不安全使用。实施强大的 Cookie 安全策略,包括输入验证以及使用 HttpOnly 和 Secure 等属性,可以帮助降低被利用的风险。监控应用程序日志中与 Cookie 操纵相关的可疑活动也很重要。
Actualice a la versión 6.5.5 o superior de Tornado. Esta versión corrige la vulnerabilidad de inyección de atributos de cookies al validar correctamente los argumentos domain, path y samesite en .RequestHandler.set_cookie.
漏洞分析和关键警报直接发送到您的邮箱。
这是一种漏洞,允许攻击者将恶意代码注入到 Cookie 的属性中,从而损害应用程序安全。
可能导致敏感信息被盗、身份被盗或在用户浏览器中执行恶意代码。
实施缓解措施,例如输入验证以及使用 HttpOnly 和 Secure 等 Cookie 安全属性。
有一些 Web 应用程序安全扫描工具可以帮助检测此漏洞。
您可以在 CVE 漏洞数据库中找到更多信息:https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-35536
CVSS 向量
上传你的 requirements.txt 文件,立即知道是否受影响。