# CVE-2020-1745: Improper Authorization in Undertoe

> Remote attackers can read web application files or execute code via file upload and inclusion in the Undertow AJP connector.

- **Severity:** High 8.6 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Apr 2020
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-1745, GHSA-gv2w-88hx-8m9r, RHSA-2020:0813, UBUNTU-CVE-2020-1745

## What is CVE-2020-1745?

CVE-2020-1745 is a high-severity path traversal vulnerability in undertow-io undertow, published on 28 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A file inclusion vulnerability was found in the AJP connector enabled with a default AJP configuration port of 8009 in Undertow version 2.0.29.Final and before and was fixed in 2.0.30.Final. A remote, unauthenticated attacker could exploit this vulnerability to read web application files from a vulnerable server. In instances where the vulnerable server allows file uploads, an attacker could upload malicious JavaServer Pages (JSP) code within a variety of file types and trigger this vulnerability to gain remote code execution.

Weakness: CWE-285 (Improper Authorization)

## Which versions are affected by CVE-2020-1745?

2 open source packages ship an affected version, including io.undertow:undertow-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `io.undertow:undertow-core` | Maven | All versions | 2.0.30 |
| `io.undertow:undertow-core` | Maven | All versions | 2.0.30 |
| `eap7-undertow` | Red Hat:jboss_enterprise_application_platform:7.2::el6 | All versions | 0:2.0.28-4.SP1_redhat_00002.1.el6eap |
| `eap7-undertow` | Red Hat:jboss_enterprise_application_platform:7.2::el7 | All versions | 0:2.0.28-4.SP1_redhat_00002.1.el7eap |
| `eap7-undertow` | Red Hat:jboss_enterprise_application_platform:7.2::el8 | All versions | 0:2.0.28-4.SP1_redhat_00002.1.el8eap |

Products: Redhat Undertow.

## How do I fix CVE-2020-1745?

Upgrade io.undertow:undertow-core to 2.0.30 or later.

## Is CVE-2020-1745 being exploited?

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

## Other vulnerabilities in undertow-io undertow

- [CVE-2018-1114](https://insights.sbomify.com/CVE-2018-1114/): Uncontrolled Resource Consumption in Undertow (medium 6.5)
- [CVE-2017-7559](https://insights.sbomify.com/CVE-2017-7559/): Undertow vulnerable to Request Smuggling (medium 6.1)
- [CVE-2024-1459](https://insights.sbomify.com/CVE-2024-1459/): Undertow: directory traversal vulnerability (medium 5.3)
- [CVE-2014-7816](https://insights.sbomify.com/CVE-2014-7816/): Improper Limitation of a Pathname to a Restricted Directory in JBoss Undertow (medium 5.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-1745 and fix it if it is affected.

What it is: CVE-2020-1745 is a high-severity path traversal vulnerability in undertow-io undertow, published on 28 Apr 2020. 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-2020-1745 in the wild and no public exploit code.

Affected packages and fixed versions:
- io.undertow:undertow-core (Maven): affected all versions; fixed in 2.0.30
- io.undertow:undertow-core (Maven): affected all versions; fixed in 2.0.30

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

## Sources

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

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