# CVE-2022-23612: Directory Traversal in OpenMRS Startup Filter

> Attackers can exfiltrate arbitrary files from the server via unsanitized GET requests in OpenMRS, requiring an upgrade to patched versions.

- **Severity:** High 7.5 (`CVSS:3.1/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:** No
- **Published:** 22 Feb 2022
- **Updated:** 22 Apr 2025
- **Also known as:** GHSA-8rgr-ww69-jv65

## What is CVE-2022-23612?

CVE-2022-23612 is a high-severity path traversal vulnerability in openmrs-core, published on 22 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

OpenMRS is a patient-based medical record system focusing on giving providers a free customizable electronic medical record system. Affected versions are subject to arbitrary file exfiltration due to failure to sanitize request when satisfying GET requests for `/images` & `/initfilter/scripts`. This can allow an attacker to access any file on a system running OpenMRS that is accessible to the user id OpenMRS is running under. Affected implementations should update to the latest patch version of OpenMRS Core for the minor version they use. These are: 2.1.5, 2.2.1, 2.3.5, 2.4.5 and 2.5.3. As a general rule, this vulnerability is already mitigated by Tomcat's URL normalization in Tomcat 7.0.28+. Users on older versions of Tomcat should consider upgrading their Tomcat instance as well as their OpenMRS instance.

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

## Which versions are affected by CVE-2022-23612?

It affects 1 product.


Products: Openmrs Openmrs.

## How do I fix CVE-2022-23612?

No fix has been published for CVE-2022-23612 yet. Limit exposure of the affected software until one is available.

## Is CVE-2022-23612 being exploited?

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

## Other vulnerabilities in openmrs-core

- [CVE-2018-19276](https://insights.sbomify.com/CVE-2018-19276/): Deserialization in n/a (critical 10.0)
- [CVE-2021-43094](https://insights.sbomify.com/CVE-2021-43094/): SQL injection in n/a (critical 9.8)
- [CVE-2017-12796](https://insights.sbomify.com/CVE-2017-12796/): Deserialization in n/a (critical 9.8)
- [CVE-2026-40076](https://insights.sbomify.com/CVE-2026-40076/): OpenMRS Core arbitrary file write and code execution via Zip Slip in module upload (critical 9.4)
- [CVE-2026-40075](https://insights.sbomify.com/CVE-2026-40075/): OpenMRS Core arbitrary file read via path traversal in ModuleResourcesServlet (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-23612 and fix it if it is affected.

What it is: CVE-2022-23612 is a high-severity path traversal vulnerability in openmrs-core, published on 22 Feb 2022. 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-2022-23612 exists.

Affected product: openmrs-core. 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-2022-23612/ (Markdown: https://insights.sbomify.com/CVE-2022-23612/index.md)
```

## Sources

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

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