CVE-2024-45302
A public proof of concept exists; no exploitation attested.
- Published2024-08-29
- Fixed in112.0.0
- WeaknessCWE-74 · CWE-93
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
RestSharp is a Simple REST and HTTP API Client for .NET. The second argument to `RestRequest.AddHeader` (the header value) is vulnerable to CRLF injection. The same applies to `RestRequest.AddOrUpdateHeader` and `RestClient.AddDefaultHeader`. The way HTTP headers are added to a request is via the `HttpHeaders.TryAddWithoutValidation` method which does not check for CRLF characters in the header value. This means that any headers from a `RestSharp.RequestHeaders` object are added to the request in such a way that they are vulnerable to CRLF-injection. In general, CRLF-injection into a HTTP header (when using HTTP/1.1) means that one can inject additional HTTP headers or smuggle whole HTTP requests. If an application using the RestSharp library passes a user-controllable value through to a header, then that application becomes vulnerable to CRLF-injection. This is not necessarily a security issue for a command line application like the one above, but if such code were present in a web application then it becomes vulnerable to request splitting (as shown in the PoC) and thus Server Side Request Forgery. Strictly speaking this is a potential vulnerability in applications using RestSharp, not in RestSharp itself, but I would argue that at the very least there needs to be a warning about this behaviour in the RestSharp documentation. RestSharp has addressed this issue in version 112.0.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.
Timeline
dates in UTC- 2024-08-2922:15CVE publishedNVD
Versions per branch
NVD · CISA-ADP · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 112.0 | ≥ 107.0.0, < 112.0.0 | 112.0.0 | NVD |
| 112.0 | ≥ 107, < 112.0.0 | 112.0.0 | CISA-ADP |
| 112.0 | ≥ 107.0.0-preview.1, < 112.0.0 | 112.0.0 | OSV |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- RestSharpAffected
- = >= 107, < 112.0.0no fix stated
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2024-08-29
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Vendor advisories
- CVE-2024-45302 Red Hat Product Security
restsharp: CRLF Injection in RestSharp's `RestRequest.AddHeader` method
Fix
- Update Restsharp to 112.0.0
Advisories and patches
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- CISA-ADP (SSVC)PoC stated2024-08-30
- PoC-in-GitHubno public repository identifiedread 2026-11-08
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2024-08-30
- CNACVSS 3.16.1known since 2026-10-23
- NVDCVSS 3.17.8read 2026-10-23
- CNAweakness (CWE)CWE-93known since 2026-10-23
- NVDweakness (CWE)CWE-74read 2026-10-23
- FIRST EPSSEPSS score0.3 %2026-11-08
- OSVaffected packages—
- GitHub AdvisoriesadvisoryMODERATE2024-08-29
Identifiers
- EUVD-2024-2495same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-4rr6-2v9v-wcpcsame flawGitHub Advisory Database · CC-BY-4.0
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Published
- 2024-08-29
- Last Modified
- 2026-06-17
- NVD status
- Analyzed
- GitHub Advisory
- GHSA-4rr6-2v9v-wcpc
Frequently asked questions
What is CVE-2024-45302?
Is CVE-2024-45302 actively exploited?
What is the CVSS score for CVE-2024-45302?
Running RestSharp? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-4rr6-2v9v-wcpc
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0