# CVE-2019-3681: osc: stores downloaded (supposed) RPM in network-controlled filesystem paths

> Remote attackers can overwrite arbitrary files by manipulating downloaded RPM paths in the SUSE osc tool.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Jun 2020
- **Updated:** 17 Sep 2024
- **Also known as:** DEBIAN-CVE-2019-3681, GHSA-9w8p-3cm4-h4c7, SUSE-SU-2020:1528-1, SUSE-SU-2020:1695-1, SUSE-SU-2020:1695-2, UBUNTU-CVE-2019-3681, openSUSE-SU-2020:0852-1

## What is CVE-2019-3681?

CVE-2019-3681 is a high-severity path traversal vulnerability in SUSE Linux Enterprise Module for Development Tools 15, published on 29 Jun 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A External Control of File Name or Path vulnerability in osc of SUSE Linux Enterprise Module for Development Tools 15, SUSE Linux Enterprise Software Development Kit 12-SP5, SUSE Linux Enterprise Software Development Kit 12-SP4; openSUSE Leap 15.1, openSUSE Factory allowed remote attackers that can change downloaded packages to overwrite arbitrary files. This issue affects: SUSE Linux Enterprise Module for Development Tools 15 osc versions prior to 0.169.1-3.20.1. SUSE Linux Enterprise Software Development Kit 12-SP5 osc versions prior to 0.162.1-15.9.1. SUSE Linux Enterprise Software Development Kit 12-SP4 osc versions prior to 0.162.1-15.9.1. openSUSE Leap 15.1 osc versions prior to 0.169.1-lp151.2.15.1. openSUSE Factory osc versions prior to 0.169.0 .

Weakness: CWE-73 (External Control of File Name or Path)

## Which versions are affected by CVE-2019-3681?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `osc` | SUSE:Linux Enterprise Module for Development Tools 15 SP1 | All versions | 0.169.1-3.20.1 |
| `osc` | SUSE:Linux Enterprise Module for Development Tools 15 SP2 | All versions | 0.169.1-3.20.1 |
| `osc` | SUSE:Linux Enterprise Software Development Kit 12 SP4 | All versions | 0.162.1-15.9.1 |
| `osc` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 0.162.1-15.9.1 |
| `osc` | openSUSE:Leap 15.1 | All versions | 0.169.1-lp151.2.15.1 |

Products: Opensuse Osc.

## How do I fix CVE-2019-3681?

Upgrade to a fixed version.

## Is CVE-2019-3681 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-3681 and fix it if it is affected.

What it is: CVE-2019-3681 is a high-severity path traversal vulnerability in SUSE Linux Enterprise Module for Development Tools 15, published on 29 Jun 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-3681 in the wild and no public exploit code.

Affected product: SUSE Linux Enterprise Module for Development Tools 15. 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-2019-3681/ (Markdown: https://insights.sbomify.com/CVE-2019-3681/index.md)
```

## Sources

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

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