CVE-2021-38512: Actix http HTTP Request Smuggling Vulnerability

HIGH
Advisory Identifier: GHSA-8928-2fgm-6x9x
CVSS 7.5
CWE-444
Published
Advisory Summary

CVE-2021-38512 is a HIGH (CVSS 7.5) http request smuggling vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Actix http libraries in the crates.io ecosystem. The issue involves http request smuggling in actix-http. Remediation is available by upgrading affected packages to version 2.2.1.

CVE-2021-38512 at a Glance

CVE Identifier CVE-2021-38512
GHSA Identifier GHSA-8928-2fgm-6x9x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Actix http
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2021-38512

To remediate this vulnerability, upgrade all affected Actix http dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

actix-http fixed: 2.2.1
Upgrade actix-http to 2.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for actix-http

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-38512, inspect your project dependencies for Actix http:

inspect dependencies for actix-http

Analyze the terminal output to locate any version of Actix http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Actix http, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Affected versions of this crate did not properly detect invalid requests that could allow HTTP/1 request smuggling (HRS) attacks when running alongside a vulnerable front-end proxy server. This can result in leaked internal and/or user data, including credentials, when the front-end proxy is also vulnerable. Popular front-end proxies and load balancers already mitigate HRS attacks so it is recommended that they are also kept up to date; check your specific set up. You should upgrade even if the front-end proxy receives exclusively HTTP/2 traffic and connects to the back-end using HTTP/1; several downgrade attacks are known that can also expose HRS vulnerabilities.

CVE-2021-38512 Affected Actix http Versions

1 component(s)
Fixed Versions:
2.2.1
Product / Package Ecosystem Affected Versions Fixed Version
actix-http
crates.io
< 2.2.1
2.2.1

References

Frequently Asked Questions

What is CVE-2021-38512?
CVE-2021-38512 is a security vulnerability in Actix http involving HTTP Request Smuggling in actix-http under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Actix http versions are affected?
Affected versions include releases prior to 2.2.1 across affected packages: actix-http.
What version fixes CVE-2021-38512?
Upgrading to 2.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is actix-http affected?
Yes, actix-http is affected in releases prior to 2.2.1. Upgrade your dependency to 2.2.1 or later.
What is the CVSS score of CVE-2021-38512?
CVE-2021-38512 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-38512?
CVE-2021-38512 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check crates.io dependencies for CVE-2021-38512?
Run the dependency tree command: 'inspect dependencies for actix-http'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8928-2fgm-6x9x",
  "modified" : "2021-08-18T20:13:40Z",
  "published" : "2021-08-25T20:58:21Z",
  "aliases" : [ "CVE-2021-38512" ],
  "summary" : "HTTP Request Smuggling in actix-http",
  "details" : "Affected versions of this crate did not properly detect invalid requests that could allow HTTP/1 request smuggling (HRS) attacks when running alongside a vulnerable front-end proxy server. This can result in leaked internal and/or user data, including credentials, when the front-end proxy is also vulnerable.\n\nPopular front-end proxies and load balancers already mitigate HRS attacks so it is recommended that they are also kept up to date; check your specific set up. You should upgrade even if the front-end proxy receives exclusively HTTP/2 traffic and connects to the back-end using HTTP/1; several downgrade attacks are known that can also expose HRS vulnerabilities.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "actix-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-38512"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/actix/actix-web/pull/2363"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/actix/actix-web/commit/e965d8298f421e9c89fe98b1300b8361e948c324"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/actix/actix-web"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/67URRW4K47SR6LNQB4YALPLGGQMQK7HO"
  }, {
    "type" : "WEB",
    "url" : "https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/actix-http/RUSTSEC-2021-0081.md"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2021-0081.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-18T20:13:40Z",
    "nvd_published_at" : "2021-08-10T23:15:00Z"
  }
}