漏洞信息
尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。
Vulnerability Title
undici vulnerable to HTTP header injection via Set-Cookie percent-decoding
Vulnerability Description
Impact:
undici's cookie parser in parseSetCookie percent-decodes cookie values via qsUnescape, turning encoded sequences like %0D%0A, %00, %3B, and %3D into their literal byte equivalents. RFC 6265 §5.4 does not specify any decoding and browsers do not decode either.
Applications that parse a Set-Cookie header and then forward the parsed value into a response header (proxies, middleware, SSR frameworks) become vulnerable to HTTP response header injection: an attacker-controlled upstream can inject arbitrary Set-Cookie, Location, or Cache-Control headers into the application's downstream response, enabling session fixation, open redirect, or cache poisoning.
Affected applications are those that use undici's cookie parsing (parseSetCookie, parseCookie, getSetCookies) and forward the parsed cookie value into a response header.
This was introduced in undici 7.0.0 via PR #3789.
Patches:
Upgrade to undici v6.26.0, v7.28.0 or v8.5.0.
Workarounds:
If upgrade is not immediately possible, do not forward values returned by parseSetCookie/parseCookie/getSetCookies directly into response headers; sanitize the value first to strip or reject CR, LF, NUL, ;, and = bytes.
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Vulnerability Type
对CRLF序列的转义处理不恰当(CRLF注入)
Vulnerability Title
Node.js undici 输入验证错误漏洞
Vulnerability Description
Node.js undici是Node.js基金会开源的一个HTTP/1.1客户端。 Node.js undici 6.26.0之前版本、7.0.0至7.28.0之前版本、8.0.0至8.5.0之前版本存在 输入验证错误漏洞,该漏洞源于parseSetCookie函数中的cookie解析器通过qsUnescape对cookie值进行百分号解码,将%0D%0A、%00、%3B、%3D等编码序列转换为原始字节,解析Set-Cookie标头并将解析值转发到响应标头的应用程序容易受到HTTP响应标头注入攻击,可能
CVSS Information
N/A
Vulnerability Type
N/A