# CVE-2009-0037: Server-side request forgery in n/a

> Remote attackers can exploit curl's redirect handling to access intranet servers, read/write local files, or execute commands via malicious URLs.

- **Severity:** Medium 6.8 (`AV:N/AC:M/Au:N/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Mar 2009
- **Updated:** 7 Aug 2024
- **Also known as:** CURL-CVE-2009-0037, DEBIAN-CVE-2009-0037, DSA-1738-1, GHSA-jr23-52fg-m7rm, RHSA-2009:0341

## What is CVE-2009-0037?

CVE-2009-0037 is a medium-severity server-side request forgery vulnerability in n/a, published on 5 Mar 2009. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The redirect implementation in curl and libcurl 5.11 through 7.19.3, when CURLOPT_FOLLOWLOCATION is enabled, accepts arbitrary Location values, which might allow remote HTTP servers to (1) trigger arbitrary requests to intranet servers, (2) read or overwrite arbitrary files via a redirect to a file: URL, or (3) execute arbitrary commands via a redirect to an scp: URL.

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2009-0037?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `curl` | Red Hat:enterprise_linux:2.1::as | All versions | 0:7.8-3.rhel2 |
| `curl-devel` | Red Hat:enterprise_linux:2.1::as | All versions | 0:7.8-3.rhel2 |
| `curl` | Red Hat:enterprise_linux:2.1::aw | All versions | 0:7.8-3.rhel2 |
| `curl-devel` | Red Hat:enterprise_linux:2.1::aw | All versions | 0:7.8-3.rhel2 |
| `curl` | Red Hat:enterprise_linux:2.1::es | All versions | 0:7.8-3.rhel2 |
| `curl-devel` | Red Hat:enterprise_linux:2.1::es | All versions | 0:7.8-3.rhel2 |
| `curl` | Red Hat:enterprise_linux:2.1::ws | All versions | 0:7.8-3.rhel2 |
| `curl-devel` | Red Hat:enterprise_linux:2.1::ws | All versions | 0:7.8-3.rhel2 |
| `curl` | Red Hat:enterprise_linux:3::as | All versions | 0:7.10.6-9.rhel3 |
| `curl-debuginfo` | Red Hat:enterprise_linux:3::as | All versions | 0:7.10.6-9.rhel3 |
| `curl-devel` | Red Hat:enterprise_linux:3::as | All versions | 0:7.10.6-9.rhel3 |
| `curl` | Red Hat:enterprise_linux:3::desktop | All versions | 0:7.10.6-9.rhel3 |
| `curl-debuginfo` | Red Hat:enterprise_linux:3::desktop | All versions | 0:7.10.6-9.rhel3 |
| `curl-devel` | Red Hat:enterprise_linux:3::desktop | All versions | 0:7.10.6-9.rhel3 |
| `curl` | Red Hat:enterprise_linux:3::es | All versions | 0:7.10.6-9.rhel3 |
| `curl-debuginfo` | Red Hat:enterprise_linux:3::es | All versions | 0:7.10.6-9.rhel3 |
| `curl-devel` | Red Hat:enterprise_linux:3::es | All versions | 0:7.10.6-9.rhel3 |
| `curl` | Red Hat:enterprise_linux:3::ws | All versions | 0:7.10.6-9.rhel3 |
| `curl-debuginfo` | Red Hat:enterprise_linux:3::ws | All versions | 0:7.10.6-9.rhel3 |
| `curl-devel` | Red Hat:enterprise_linux:3::ws | All versions | 0:7.10.6-9.rhel3 |
| `curl` | Red Hat:enterprise_linux:4::as | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-debuginfo` | Red Hat:enterprise_linux:4::as | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-devel` | Red Hat:enterprise_linux:4::as | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl` | Red Hat:enterprise_linux:4::desktop | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-debuginfo` | Red Hat:enterprise_linux:4::desktop | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-devel` | Red Hat:enterprise_linux:4::desktop | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl` | Red Hat:enterprise_linux:4::es | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-debuginfo` | Red Hat:enterprise_linux:4::es | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-devel` | Red Hat:enterprise_linux:4::es | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl` | Red Hat:enterprise_linux:4::ws | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-debuginfo` | Red Hat:enterprise_linux:4::ws | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl-devel` | Red Hat:enterprise_linux:4::ws | All versions | 0:7.12.1-11.1.el4_7.1 |
| `curl` | Red Hat:enterprise_linux:5::client | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl-debuginfo` | Red Hat:enterprise_linux:5::client | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl` | Red Hat:enterprise_linux:5::client_workstation | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl-debuginfo` | Red Hat:enterprise_linux:5::client_workstation | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl-devel` | Red Hat:enterprise_linux:5::client_workstation | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl` | Red Hat:enterprise_linux:5::server | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl-debuginfo` | Red Hat:enterprise_linux:5::server | All versions | 0:7.15.5-2.1.el5_3.4 |
| `curl-devel` | Red Hat:enterprise_linux:5::server | All versions | 0:7.15.5-2.1.el5_3.4 |

Products: Curl Curl, Curl Libcurl.

## How do I fix CVE-2009-0037?

Upgrade to a fixed version.

## Is CVE-2009-0037 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2009-0037 exists.

Public exploit code:

- cURL/libcURL 7.19.3 - HTTP 'Location:' Redirect Security Bypass (exploitdb)

## Other vulnerabilities in n/a

- [CVE-2012-0036](https://insights.sbomify.com/CVE-2012-0036/): Other in n/a (high 7.5)
- [CVE-2005-3185](https://insights.sbomify.com/CVE-2005-3185/): Memory corruption in n/a (high 7.5)
- [CVE-2010-3842](https://insights.sbomify.com/CVE-2010-3842/): Path traversal in n/a (medium 5.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2009-0037 and fix it if it is affected.

What it is: CVE-2009-0037 is a medium-severity server-side request forgery vulnerability in n/a, published on 5 Mar 2009. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2009-0037 exists.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2009-0037/ (Markdown: https://insights.sbomify.com/CVE-2009-0037/index.md)
```

## Sources

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

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