# CVE-2023-20052: XML external entity in Cisco Secure Endpoint

> An unauthenticated remote attacker can leak sensitive file bytes by submitting a crafted DMG file to ClamAV due to XML external entity injection in the DMG parser.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/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:** 16 Feb 2023
- **Updated:** 2 Aug 2024
- **Also known as:** AZL-13723, CLEANSTART-2026-BB44152, DEBIAN-CVE-2023-20052, GHSA-pcr4-7r58-755h, UBUNTU-CVE-2023-20052

## What is CVE-2023-20052?

CVE-2023-20052 is a medium-severity vulnerability in Clamav Clamav, published on 16 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was disclosed:
  A vulnerability in the DMG file parser of ClamAV versions 1.0.0 and earlier, 0.105.1 and earlier, and 0.103.7 and earlier could allow an unauthenticated, remote attacker to access sensitive information on an affected device.
  This vulnerability is due to enabling XML entity substitution that may result in XML external entity injection. An attacker could exploit this vulnerability by submitting a crafted DMG file to be scanned by ClamAV on an affected device. A successful exploit could allow the attacker to leak bytes from any file that may be read by the ClamAV scanning process.

Weakness: CWE-776 (Improper Restriction of Recursive Entity References in DTDs), CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2023-20052?

It affects 4 products.


Products: Cisco Secure Endpoint, Cisco Secure Endpoint Private Cloud, Clamav Clamav, Stormshield Stormshield Network Security.

## How do I fix CVE-2023-20052?

Upgrade to a fixed version.

## Is CVE-2023-20052 being exploited?

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

Public exploit code:

- CVE-2023-20052, information leak vulnerability in the DMG file parser of ClamAV (github_poc): https://github.com/nokn0wthing/CVE-2023-20052
- CVE-2023-20052 information leak vulnerability in the DMG file parser of ClamAV (github_poc): https://github.com/cY83rR0H1t/CVE-2023-20052
- Working Docker build for the ClamAV XXE exploit (CVE-2023-20052), patched to compile on OpenSSL 3.0 (github_poc): https://github.com/MOHITSINGHPAPOLA/CVE-2023-20052
- Original standalone Proof-of-Concept exploit and execution harness for CVE-2023-20052 (ClamAV DMG XML Entity Expansion). (github_poc): https://github.com/tralsesec/CVE-2023-20052

## Other vulnerabilities in Clamav Clamav

- [CVE-2023-20032](https://insights.sbomify.com/CVE-2023-20032/): Memory corruption in Cisco Secure Endpoint (critical 9.8)
- [CVE-2022-20770](https://insights.sbomify.com/CVE-2022-20770/): ClamAV CHM File Parsing Denial of Service Vulnerability Affecting Cisco Products: April 2022 (high 8.6)
- [CVE-2026-20348](https://insights.sbomify.com/CVE-2026-20348/): ClamAV XAR File Format Processing Memory Corruption Vulnerability (high 7.5)
- [CVE-2026-20213](https://insights.sbomify.com/CVE-2026-20213/): ClamAV PE File Format Processing Out-of-Bounds Memory Corruption Vulnerability (high 7.5)
- [CVE-2026-20214](https://insights.sbomify.com/CVE-2026-20214/): ClamAV FSG File Format Processing Out-of-Bounds Memory Corruption Vulnerability (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-20052 and fix it if it is affected.

What it is: CVE-2023-20052 is a medium-severity vulnerability in Clamav Clamav, published on 16 Feb 2023. 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-2023-20052 in the wild and no public exploit code.

Affected product: Clamav Clamav. 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-2023-20052/ (Markdown: https://insights.sbomify.com/CVE-2023-20052/index.md)
```

## Sources

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

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