CVE-2021-22959: HTTP Request Smuggling due to spaced in headers

Published Oct 12, 2021
·
Updated

An HTTP Request Smuggling (HRS) vulnerability was found in the llhttp library, used by Node.JS. Spaces as part of the header names were accepted as valid. In situations where HTTP conversations are being proxied (such as proxy, reverse-proxy, load-balancer), an attacker can use this flaw to inject arbitrary messages through the proxy. The highest threat from this vulnerability is to confidentiality and integrity.

Other sources

FasterXML jackson-databind is vulnerable to a denial of service, caused by an error when using JDK serialization to serialize and deserialize JsonNode values. By sending a specially crafted request, an attacker could exploit this vulnerability to cause a denial of service.

— IBM

The http parser accepts requests with a space (SP) right after the header name before the colon. The http parser ignores chunk extensions when parsing the body of chunked requests. These can lead to HTTP Request Smuggling (HRS). See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22959 and https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22960 for more details.

— Node.Js

The http parser accepts requests with a space (SP) right after the header name before the colon. This can lead to HTTP Request Smuggling (HRS).

The fix for this is included in llhttp v2.1.4 and v6.0.6.

Impacts:

All versions of the 16.x, 14.x, and 12.x releases lines.

— Red Hat

The http parser accepts requests with a space (SP) right after the header name before the colon. This can lead to HTTP Request Smuggling (HRS). More details will be available at CVE-2021-22959 after publication.

The fix for this is included in llhttp v2.1.4 and v6.0.6.

Thanks to Mattias Grenfeldt (https://grenfeldt.dev/) and Asta Olofsson for reporting this vulnerability.

All versions of the 16.x, 14.x, and 12.x releases lines.

— Node.Js

The parser in accepts requests with a space (SP) right after the header name before the colon. This can lead to HTTP Request Smuggling (HRS) in llhttp < v2.1.4 and < v6.0.6.

Affected Software

43 affected componentsFixes available
redhat/rh-nodejs14-nodejs<0:14.18.2-1.el7
0:14.18.2-1.el7
redhat/rh-nodejs14-nodejs-nodemon<0:2.0.3-6.el7
0:2.0.3-6.el7
redhat/rh-nodejs12-nodejs<0:12.22.12-2.el7
0:12.22.12-2.el7
redhat/llhttp<6.0.6
6.0.6
redhat/llhttp<2.1.4
2.1.4
redhat/node<12.22.7
12.22.7
redhat/node<14.18.1
14.18.1
redhat/node<16.11.1
16.11.1
IBM Cognos Controller<=11.0.0 - 11.0.1
llhttp Llhttp Node.js<2.1.4
llhttp Llhttp Node.js>=3.0.0<6.0.6
Oracle GraalVM=20.3.4
Oracle GraalVM=21.3.0
Debian Debian Linux=11.0
Node.js Node.js>=12.0.0<12.22.7, >=14.0.0<14.18.1, >=16.0.0<16.11.1
12.22.714.18.116.11.1
Node.js Node.js>=12.0.0<12.22.7
12.22.7
Node.js Node.js>=14.0.0<14.18.1
14.18.1
Node.js Node.js>=16.0.0<16.11.1
16.11.1
debian/nodejs
18.20.4+dfsg-1~deb12u218.20.4+dfsg-1~deb12u320.19.2+dfsg-1+deb13u220.19.2+dfsg-1+deb13u324.21.0+dfsg+~cs24.13.4-124.22.2+dfsg+~cs24.19.2-1
alpine/nodejs<12.22.10-r0
12.22.10-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs<14.18.1-r0
14.18.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0
alpine/nodejs-current<16.11.1-r0
16.11.1-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rh-nodejs14-nodejs to a version that resolves this vulnerability.

    Fixed in 0:14.18.2-1.el7
  2. Upgrade

    Upgrade redhat/rh-nodejs14-nodejs-nodemon to a version that resolves this vulnerability.

    Fixed in 0:2.0.3-6.el7
  3. Upgrade

    Upgrade redhat/rh-nodejs12-nodejs to a version that resolves this vulnerability.

    Fixed in 0:12.22.12-2.el7
  4. Upgrade

    Upgrade redhat/llhttp to a version that resolves this vulnerability.

    Fixed in 6.0.6
  5. Upgrade

    Upgrade redhat/llhttp to a version that resolves this vulnerability.

    Fixed in 2.1.4
  6. Upgrade

    Upgrade redhat/node to a version that resolves this vulnerability.

    Fixed in 12.22.7
  7. Upgrade

    Upgrade redhat/node to a version that resolves this vulnerability.

    Fixed in 14.18.1
  8. Upgrade

    Upgrade redhat/node to a version that resolves this vulnerability.

    Fixed in 16.11.1
  9. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 12.22.7Fixed in 14.18.1Fixed in 16.11.1
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 12.22.7
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 14.18.1
  12. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 16.11.1
  13. Upgrade

    Upgrade debian/nodejs to a version that resolves this vulnerability.

    Fixed in 18.20.4+dfsg-1~deb12u2Fixed in 18.20.4+dfsg-1~deb12u3Fixed in 20.19.2+dfsg-1+deb13u2Fixed in 20.19.2+dfsg-1+deb13u3Fixed in 24.21.0+dfsg+~cs24.13.4-1Fixed in 24.22.2+dfsg+~cs24.19.2-1
  14. Upgrade

    Upgrade alpine/nodejs to a version that resolves this vulnerability.

    Fixed in 12.22.10-r0
  15. Upgrade

    Upgrade alpine/nodejs to a version that resolves this vulnerability.

    Fixed in 14.18.1-r0
  16. Upgrade

    Upgrade alpine/nodejs-current to a version that resolves this vulnerability.

    Fixed in 16.11.1-r0
  17. Upgrade

    Upgrade llhttp to a version that resolves this vulnerability.

    Fixed in 2.1.4
  18. Upgrade

    Upgrade llhttp to a version that resolves this vulnerability.

    Fixed in 6.0.6

Event History

Oct 12, 2021
CVE Published
12:00 AM
Data Sourced
via Node.js·03:35 PM
SeverityAffected Software
Data Sourced
via Node.js·04:00 PM
Description
Nov 15, 2021
CVE Published
via MITRE·02:45 PM
Data Sourced
via MITRE·02:45 PM
DescriptionWeakness
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·03:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2021-22959?

CVE-2021-22959 is an HTTP Request Smuggling vulnerability found in the llhttp library, used by Node.JS.

2

How does CVE-2021-22959 impact HTTP conversations?

CVE-2021-22959 allows an attacker to inject malicious content into HTTP conversations that are being proxied, such as proxy, reverse-proxy, or load-balancer.

3

Which versions of Node.JS are affected by CVE-2021-22959?

The affected versions of Node.JS include rh-nodejs14-nodejs, rh-nodejs14-nodejs-nodemon, rh-nodejs12-nodejs, node (v12.22.7), and node (v14.18.1).

4

What is the severity of CVE-2021-22959?

The severity of CVE-2021-22959 is medium, with a CVSS score of 6.1.

5

How can I fix CVE-2021-22959?

To fix CVE-2021-22959, update the affected software packages to the specified versions provided by Red Hat.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203