# CVE-2018-14912: Path traversal in n/a

> An attacker can read arbitrary files via directory traversal in CGit when HTTP cloning is enabled, requiring an upgrade to fix.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Aug 2018
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2018-14912, DEBIAN-CVE-2018-14912, DLA-1459-1, DSA-4263-1, GHSA-46c3-xc8j-9qg7, MGASA-2018-0351, UBUNTU-CVE-2018-14912, USN-8757-1, openSUSE-SU-2024:10679-1

## What is CVE-2018-14912?

CVE-2018-14912 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 3 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

cgit_clone_objects in CGit before 1.2.1 has a directory traversal vulnerability when `enable-http-clone=1` is not turned off, as demonstrated by a cgit/cgit.cgi/git/objects/?path=../ request.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2018-14912?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cgit` | openSUSE:Tumbleweed | All versions | 1.2.3-1.10 |

Products: Cgit Project Cgit, Debian Debian Linux.

## How do I fix CVE-2018-14912?

Upgrade to a fixed version.

## Is CVE-2018-14912 being exploited?

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

Public exploit code:

- cgit Directory Traversal (metasploit)
- cgit 1.2.1 - Directory Traversal (Metasploit) (exploitdb)
- cgit < 1.2.1 - Directory Traversal (nuclei): http/cves/2018/CVE-2018-14912.yaml

## Other vulnerabilities in Debian Debian Linux

- [CVE-2016-1901](https://insights.sbomify.com/CVE-2016-1901/): Integer overflow in n/a (critical 9.8)
- [CVE-2016-1899](https://insights.sbomify.com/CVE-2016-1899/): Cross-site scripting in n/a (low 3.7)
- [CVE-2016-1900](https://insights.sbomify.com/CVE-2016-1900/): Cross-site scripting in n/a (low 3.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-14912 and fix it if it is affected.

What it is: CVE-2018-14912 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 3 Aug 2018. 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-2018-14912 exists.

Affected product: Debian Debian Linux. 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-2018-14912/ (Markdown: https://insights.sbomify.com/CVE-2018-14912/index.md)
```

## Sources

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

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