# CRLF Injection in RestSharp's \`RestRequest.AddHeader\` method

Advisory record · `GHSA-4rr6-2v9v-wcpc`

- **Identifiers:** `GHSA-4rr6-2v9v-wcpc` · `CVE-2024-45302`
- **State:** Confirmed
- **Severity:** CVSS 6.1 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-74](https://cwe.mitre.org/data/definitions/74.html) · [CWE-93](https://cwe.mitre.org/data/definitions/93.html) · [CWE-113](https://cwe.mitre.org/data/definitions/113.html)
- **Tags:** [Other injection](https://agentprime.io/advisories/tag/injection.md)
- **Published:** 29 Aug 2024
- **Updated:** 1 Oct 2024
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 29 Aug 2024, 19:30 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `RestSharp` (NuGet): affected `>=107.0.0-preview.1, <112.0.0`; fixed in `112.0.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The NuGet package RestSharp from 107.0.0-preview.1 up to (but not including) 112.0.0 is vulnerable to CRLF injection through header values passed to RestRequest.AddHeader, RestRequest.AddOrUpdateHeader, and RestClient.AddDefaultHeader. An attacker who can control a header value supplied by the application could inject line breaks, adding extra headers or splitting requests, which may enable server-side request forgery in web applications. Upgrade to RestSharp 112.0.0 or later; the source gives no other workaround beyond not passing untrusted input into header values.

Written 9 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 6.1 Medium, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0032, the 24th percentile, on 11 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 15:23 UTC: First seen by agentprime
- 31 Oct 2026, 15:23 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-4rr6-2v9v-wcpc)

## Sources

- [GitHub Advisory Database: GHSA-4rr6-2v9v-wcpc](https://github.com/advisories/GHSA-4rr6-2v9v-wcpc)
- [OSV: GHSA-4rr6-2v9v-wcpc](https://osv.dev/vulnerability/GHSA-4rr6-2v9v-wcpc)
- <https://github.com/restsharp/RestSharp/security/advisories/GHSA-4rr6-2v9v-wcpc>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45302>
- <https://github.com/restsharp/RestSharp/commit/0fba5e727d241b1867bd71efc912594075c2934b>
- <https://github.com/restsharp/RestSharp>
- <https://github.com/restsharp/RestSharp/blob/777bf194ec2d14271e7807cc704e73ec18fcaf7e/src/RestSharp/Request/HttpRequestMessageExtensions.cs#L32>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-4rr6-2v9v-wcpc>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-4rr6-2v9v-wcpc/>. Everything for agents: <https://agentprime.io/llms.txt>.
