CVE-2023-29197: Improper header validation

Published Apr 17, 2023
·
Updated

Impact

Improper header parsing. An attacker could sneak in a newline (\n) into both the header names and values. While the specification states that \r\n\r\n is used to terminate the header list, many servers in the wild will also accept \n\n.

Patches

The issue is patched in 1.9.1 and 2.4.5.

Workarounds

There are no known workarounds.

References

https://www.rfc-editor.org/rfc/rfc7230#section-3.2.4

Other sources

guzzlehttp/psr7 is a PSR-7 HTTP message library implementation in PHP. Affected versions are subject to improper header parsing. An attacker could sneak in a newline (\n) into both the header names and values. While the specification states that \r\n\r\n is used to terminate the header list, many servers in the wild will also accept \n\n. This is a follow-up to CVE-2022-24775 where the fix was incomplete. The issue has been patched in versions 1.9.1 and 2.4.5. There are no known workarounds for this vulnerability. Users are advised to upgrade.

— Ubuntu

Affected Software

16 affected componentsFixes available
composer/guzzlehttp/psr7>=2, <2.4.5, <1.9.1
composer/guzzlehttp/psr7>=2.0.0<2.4.5
2.4.5
composer/guzzlehttp/psr7<1.9.1
1.9.1
ubuntu/php-guzzlehttp-psr7<1.4.2-0.1+
1.4.2-0.1+
ubuntu/php-guzzlehttp-psr7<1.8.3-1ubuntu0.1~
1.8.3-1ubuntu0.1~
ubuntu/php-guzzlehttp-psr7<2.4.5
2.4.5
ubuntu/php-nyholm-psr7<1.5.0-1ubuntu0.1~
1.5.0-1ubuntu0.1~
ubuntu/php-nyholm-psr7<1.6.1
1.6.1
debian/php-guzzlehttp-psr7
1.7.0-1+deb11u22.4.5-12.6.2-3
debian/php-nyholm-psr7
1.3.2-2+deb11u11.5.1-21.8.1-2
Guzzlephp Psr-7<1.9.1
Guzzlephp Psr-7>=2.0.0<2.4.5
Fedoraproject Fedora=37
Fedoraproject Fedora=38
composer/guzzlehttp/psr7>=2, <2.4.5
2.4.5
composer/guzzlehttp/psr7<1.9.1
1.9.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/guzzlehttp/psr7 to a version that resolves this vulnerability.

    Fixed in 2.4.5
  2. Upgrade

    Upgrade composer/guzzlehttp/psr7 to a version that resolves this vulnerability.

    Fixed in 1.9.1
  3. Upgrade

    Upgrade ubuntu/php-guzzlehttp-psr7 to a version that resolves this vulnerability.

    Fixed in 1.4.2-0.1+
  4. Upgrade

    Upgrade ubuntu/php-guzzlehttp-psr7 to a version that resolves this vulnerability.

    Fixed in 1.8.3-1ubuntu0.1~
  5. Upgrade

    Upgrade ubuntu/php-guzzlehttp-psr7 to a version that resolves this vulnerability.

    Fixed in 2.4.5
  6. Upgrade

    Upgrade ubuntu/php-nyholm-psr7 to a version that resolves this vulnerability.

    Fixed in 1.5.0-1ubuntu0.1~
  7. Upgrade

    Upgrade ubuntu/php-nyholm-psr7 to a version that resolves this vulnerability.

    Fixed in 1.6.1
  8. Upgrade

    Upgrade debian/php-guzzlehttp-psr7 to a version that resolves this vulnerability.

    Fixed in 1.7.0-1+deb11u2Fixed in 2.4.5-1Fixed in 2.6.2-3
  9. Upgrade

    Upgrade debian/php-nyholm-psr7 to a version that resolves this vulnerability.

    Fixed in 1.3.2-2+deb11u1Fixed in 1.5.1-2Fixed in 1.8.1-2
  10. Upgrade

    Upgrade guzzlehttp/psr7 to a version that resolves this vulnerability.

    Fixed in 1.9.1
  11. Upgrade

    Upgrade guzzlehttp/psr7 to a version that resolves this vulnerability.

    Fixed in 2.4.5

Event History

Apr 17, 2023
CVE Published
via Ubuntu·12:00 AM
Advisory Published
04:00 PM
Advisory Published
via Packagist·04:00 PM
Data Sourced
via Packagist·04:00 PM
DescriptionSeverityAffected Software
Data Sourced
09:08 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeaknessAffected Software
Apr 19, 2023
Advisory Published
via GitHub·06:25 PM
Data Sourced
via GitHub·06:25 PM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2023-29197?

CVE-2023-29197 is a vulnerability in the guzzlehttp/psr7 library that allows for improper header validation, potentially enabling an attacker to inject malicious content into HTTP headers.

2

How does CVE-2023-29197 impact the guzzlehttp/psr7 library?

CVE-2023-29197 affects versions up to 2.4.5 and 1.9.1 of the guzzlehttp/psr7 library, allowing for improper parsing of newline characters in header names and values.

3

What is the severity of CVE-2023-29197?

CVE-2023-29197 has a severity rating of 7.5, which is classified as high.

4

How can I fix CVE-2023-29197 in my application?

To fix CVE-2023-29197, update the guzzlehttp/psr7 library to version 2.4.6 or higher.

5

Are there any references about CVE-2023-29197?

Yes, you can find more information about CVE-2023-29197 at the following references: - Advisory: https://github.com/guzzle/psr7/security/advisories/GHSA-wxmh-65f7-jcvw - CVE Entry: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-24775 - Advisory: https://github.com/guzzle/psr7/security/advisories/GHSA-q7rv-6hp3-vh96

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