Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in benoitc hackney allows HTTP Response Splitting. The hackney_cookie:setcookie/3 function in src/hackney_cookie.erl validates the Name and Value arguments against CRLF and control characters, but concatenates the domain and path options verbatim into the output iolist with no equivalent check. An attacker who controls either option — for example by supplying a Host header value forwarded as the cookie domain, or a request path forwarded as the cookie path — can inject a literal CRLF sequence and arbitrary additional Set-Cookie headers into the HTTP response.
This issue affects hackney: from 0.9.0 before 4.0.1.
A CRLF injection vulnerability in hackney's cookie handling allows attackers to inject arbitrary HTTP headers through unvalidated domain and path parameters. This enables HTTP response splitting attacks that could lead to cache poisoning, session fixation, or credential theft.
يحتوي hackney على ثغرة حقن CRLF في دالة setcookie/3 حيث لا يتم التحقق من صحة معاملات المجال والمسار قبل دمجها في رؤوس HTTP. يمكن لمهاجم يتحكم بقيمة رأس Host أو مسار الطلب حقن تسلسلات CRLF وإضافة رؤوس Set-Cookie عشوائية.
A CRLF injection vulnerability in hackney's cookie handling allows attackers to inject arbitrary HTTP headers through unvalidated domain and path parameters. This enables HTTP response splitting attacks that could lead to cache poisoning, session fixation, or credential theft.
Upgrade hackney to version 4.0.1 or later immediately. Review and validate all cookie domain and path parameters before use. Implement input validation to reject CRLF sequences in user-controlled values forwarded to cookie functions. Apply Web Application Firewall rules to detect and block CRLF injection attempts.
قم بترقية hackney إلى الإصدار 4.0.1 أو أحدث فوراً. راجع وتحقق من صحة جميع معاملات مجال وسسار ملفات تعريف الارتباط قبل الاستخدام. طبق التحقق من صحة المدخلات لرفض تسلسلات CRLF في القيم التي يتحكم بها المستخدم. طبق قواعد جدار الحماية لتطبيقات الويب لكشف ومنع محاولات حقن CRLF.