# CVE-2026-82880: YaCy Search Server through 1.941 XML External Entity Injection via Parsers

The Markdown version of <https://upatch.dev/cve/CVE-2026-82880>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-82880 is rated High 8.7 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects YaCy (yacy) and was published on 31 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.6%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-82880-xxe-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-82880 affects YaCy Search Server through 1.941 (CWE-611). In `source/net/yacy/document/parser/images/svgParser.java`, `source/net/yacy/document/parser/mmParser.java`, and `source/net/yacy/document/parser/xml/opensearchdescriptionReader.java`, `getParser()` creates a `SAXParser` via `SAXParserFactory.newInstance().newSAXParser()` without disabling `DOCTYPE` declarations or external general and parameter entities. When YaCy fetches and parses an SVG (`image/svg+xml`), FreeMind (`application/x-freemind`), or OpenSearch description document containing a `DOCTYPE` with a `SYSTEM` entity pointing to a `file:///` URI, the SAX parser opens the referenced local file and incorporates its contents into the parsed document fields (such as the SVG `<title>`) and the searchable Solr index. Upstream commit `3c3a307e8b7a0ebbc4d1e6b10898b52e15c0cd44` fixes the three parsers by enabling `http://apache.org/xml/features/disallow-doctype-decl` and disabling `http://xml.org/sax/features/external-general-entities` and `http://xml.org/sax/features/external-parameter-entities`.

### Official description

YaCy Search Server through 1.941 contains an XML external entity injection vulnerability in SVG, FreeMind, and OpenSearch parsers that fail to disable external entity resolution. Attackers can publish malicious documents with DOCTYPE declarations containing SYSTEM entities pointing to local files, causing the crawler to exfiltrate file contents into the searchable index.

## What the upatch does

One BPF LSM program on `lsm/file_open` returns `-EPERM` when all of the following hold:

| Condition           | Checked                                                                                                                                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Regular file        | `(dentry->d_inode->i_mode & S_IFMT) == S_IFREG`                                                                                                                                                                           |
| Sensitive host path | Directly in `/etc` (excluding standard resolver and locale files `hosts`, `resolv.conf`, `nsswitch.conf`, `localtime`, `timezone`, `ld.so.cache`, `gai.conf`, and `host.conf`), directly in `/root`, or in `/home/<user>` |
| YaCy process        | Current task executable (`mm->exe_file`) is `java` and current working directory (`fs->pwd.dentry`) is `yacy`, as set by `startYACY.sh`                                                                                   |

When the SAX parser tries to resolve an external `file:///` entity pointing to a file such as `/etc/hostname` or `/etc/passwd`, `openat` fails with `EPERM`, causing `svgParser.parse()` to abort with `Parser.Failure` instead of indexing or returning the file's contents. The per-CPU map `refused` counts blocked opens at key 0.

The policy: [`cve-2026-82880-xxe-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82880), 111 lines of BPF C attached at `lsm/file_open`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- A YaCy `java` process running with working directory `yacy` cannot open regular files directly in `/etc` (other than the listed resolver and locale files), `/root`, or `/home/<user>`.
- Normal YaCy operation—reading and writing its own `DATA/`, `htroot/`, `defaults/`, and `lib/` trees under `yacy/`, reading TLS trust stores under `/etc/ssl/` or `/etc/java-*`, and parsing SVG documents without external file entities—continues to work.
- Not covered: a YaCy instance started from a working directory not named `yacy`, or an XXE payload reading files inside the `yacy/` directory itself.

## Preemption model and cost

The program keeps no shared state beyond the per-CPU `refused` counter, updated with `__sync_fetch_and_add`, and is safe under every preemption model including `PREEMPT_LAZY`, `PREEMPT_DYNAMIC`, and `PREEMPT_RT`. On every `file_open` outside `/etc`, `/root`, and `/home/<user>`, the program checks the parent and grandparent dentry names and returns before inspecting the current task.

## Affected versions

YaCy Search Server through 1.941 (`yacy_v1.941_202603291103_f0464e7fb`). Fixed in commit `3c3a307e8b7a0ebbc4d1e6b10898b52e15c0cd44` (28 August 2026).

Kernels: any Linux kernel with BPF LSM and BTF enabled.

## How it was tested

On YaCy Search Server 1.941, the loaded upatch refused svgParser opening /etc/hostname during external entity resolution while allowing normal SVG parsing.

- **Tested:** 25 Nov 2026
- **Target:** YaCy Search Server 1.941 (202603291103_f0464e7fb), loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64

### Results

| State           | svgParser resolves file:///etc/hostname | Internal DOCTYPE SVG parsed |
| --------------- | --------------------------------------- | --------------------------- |
| Before loading  | yes                                     | yes                         |
| Upatch loaded   | no (blocked at file_open)               | yes                         |
| After unloading | yes                                     | yes                         |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82880
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-82880-1.0.0.bee oci://<registry>/<namespace>/cve-2026-82880 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-82880-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-82880 advisory (VulnCheck)](https://www.vulncheck.com/advisories/yacy-search-server-through-1.941-xml-external-entity-injection-via-parsers)
- [YaCy issue #818](https://github.com/yacy/yacy_search_server/issues/818)
- [Fix commit 3c3a307e8b7a](https://github.com/yacy/yacy_search_server/commit/3c3a307e8b7a0ebbc4d1e6b10898b52e15c0cd44)
- [Vulnerable svgParser.java in Release 1.941](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/images/svgParser.java#L72)
- [Vulnerable mmParser.java in Release 1.941](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/mmParser.java#L66)
- [Vulnerable opensearchdescriptionReader.java in Release 1.941](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java#L119)

### Links

- [CVE-2026-82880 on upatch.dev](https://upatch.dev/cve/CVE-2026-82880) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-82880)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-82880)
- [CWE-611](https://cwe.mitre.org/data/definitions/611.html)
- Upatch source: [upatches/cve-2026-82880](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82880)

### More references from NVD (7)

- [github.com](https://github.com/yacy/yacy_search_server)
- [github.com](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/images/svgParser.java#L72)
- [github.com](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/mmParser.java#L66)
- [github.com](https://github.com/yacy/yacy_search_server/blob/Release_1.941/source/net/yacy/document/parser/xml/opensearchdescriptionReader.java#L119)
- [github.com](https://github.com/yacy/yacy_search_server/commit/3c3a307e8b7a0ebbc4d1e6b10898b52e15c0cd44)
- [github.com](https://github.com/yacy/yacy_search_server/issues/818)
- [vulncheck.com](https://www.vulncheck.com/advisories/yacy-search-server-through-1.941-xml-external-entity-injection-via-parsers)
