HTTP Header Injection Affecting http package, versions <0.13.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.08% (34th 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-PUB-HTTP-5874334
  • published 30 Aug 2023
  • disclosed 29 Aug 2023
  • credit n0npax

How to fix?

Upgrade http to version 0.13.3 or higher.

Overview

Affected versions of this package are vulnerable to HTTP Header Injection. When the attacker controls the HTTP method and the app uses Request directly, it's possible to achieve CRLF injection in an HTTP request.

PoC

 var r = Request(
      "GET http://example.com/ HTTP/1.1\r\nHost: example.com\r\nLLAMA:",
      Uri(scheme: "http", path: "/llama", host: "localhost"));
  var rs = await r.send();

CVSS Scores

version 3.1
Expand this section

Snyk

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

NVD

6.1 medium