# CVE-2022-24775: Improper Input Validation in guzzlehttp/psr7

> Attackers can inject newlines into HTTP headers via improper parsing, potentially bypassing security controls or modifying data in applications using this library.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Mar 2022
- **Updated:** 23 Apr 2025
- **Also known as:** BIT-drupal-2022-24775, DEBIAN-CVE-2022-24775, DRUPAL-CORE-2022-006, GHSA-q7rv-6hp3-vh96, UBUNTU-CVE-2022-24775

## What is CVE-2022-24775?

CVE-2022-24775 is a high-severity vulnerability in Drupal Drupal, published on 21 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

guzzlehttp/psr7 is a PSR-7 HTTP message library. Versions prior to 1.8.4 and 2.1.1 are vulnerable to improper header parsing. An attacker could sneak in a new line character and pass untrusted values. The issue is patched in 1.8.4 and 2.1.1. There are currently no known workarounds.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2022-24775?

6 open source packages ship an affected version, including drupal, drupal/core and guzzlehttp/psr7. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `drupal` | Bitnami | From 8.0.0 | 9.2.16, 9.3.9 |
| `drupal/core` | Packagist | From 8.0.0 | 9.2.16, 9.3.9 |
| `guzzlehttp/psr7` | Packagist | All versions | 1.8.4 |
| `guzzlehttp/psr7` | Packagist | All versions | 1.8.4 |
| `guzzlehttp/psr7` | Packagist | From 2.0.0 | 2.1.1 |
| `guzzlehttp/psr7` | Packagist | From 2.0.0 | 2.1.1 |

Products: Drupal Drupal, Guzzlephp Psr-7.

## How do I fix CVE-2022-24775?

Upgrade drupal to a fixed version for your release line: 9.2.16 or 9.3.9.

## Is CVE-2022-24775 being exploited?

There is no known exploitation of CVE-2022-24775 in the wild and no public exploit code.

## Other vulnerabilities in Drupal Drupal

- [CVE-2026-9082](https://insights.sbomify.com/CVE-2026-9082/): Drupal Core SQL Injection (critical 9.8, exploited in the wild)
- [CVE-2020-13671](https://insights.sbomify.com/CVE-2020-13671/): Drupal core Un-restricted Upload of File (high 8.8, exploited in the wild)
- [CVE-2019-6340](https://insights.sbomify.com/CVE-2019-6340/): Drupal Core Remote Code Execution (high 8.1, exploited in the wild)
- [CVE-2009-3352](https://insights.sbomify.com/CVE-2009-3352/): Other in n/a (critical 10.0)
- [CVE-2024-55636](https://insights.sbomify.com/CVE-2024-55636/): Drupal core - Less critical - Gadget chain - SA-CORE-2024-006 (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-24775 and fix it if it is affected.

What it is: CVE-2022-24775 is a high-severity vulnerability in Drupal Drupal, published on 21 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-24775 in the wild and no public exploit code.

Affected packages and fixed versions:
- drupal (Bitnami): affected from 8.0.0; fixed in 9.2.16, 9.3.9
- drupal/core (Packagist): affected from 8.0.0; fixed in 9.2.16, 9.3.9
- guzzlehttp/psr7 (Packagist): affected all versions; fixed in 1.8.4
- guzzlehttp/psr7 (Packagist): affected all versions; fixed in 1.8.4
- guzzlehttp/psr7 (Packagist): affected from 2.0.0; fixed in 2.1.1
- guzzlehttp/psr7 (Packagist): affected from 2.0.0; fixed in 2.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-24775/ (Markdown: https://insights.sbomify.com/CVE-2022-24775/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-24775
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-24775
- OSV: https://osv.dev/vulnerability/CVE-2022-24775

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-24775/
Summaries are generated and may contain mistakes; the official description above is the record.
