CVE-2026-82880
YaCy Search Server through 1.941 XML External Entity Injection via Parsers
Refuses local host file opens by YaCy Search Server to mitigate XML external entity injection CVE-2026-82880.
High 8.7Vetted
EPSS 0.6%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.
At a glance
CVE-2026-82880 is a high (CVSS 8.7) vulnerability in YaCy, published 31 August 2026. A vetted upatch, cve-2026-82880-xxe-block, blocks it on running Linux machines with shirudo until YaCy is upgraded.
- Severity
- High 8.7 CVSS 4.0
- Chance of exploitation
- 0.6% in the next 30 days (EPSS, 24 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-611
- Affected software
- YaCy
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
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.
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.
Sources
More references from NVD (7)
Mitigation
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.
Side effects
- A YaCy
javaprocess running with working directoryyacycannot 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/, andlib/trees underyacy/, 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 theyacy/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.
The policy
111 lines of BPF C, attached at lsm/file_open.
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#define EPERM 1
#define S_IFMT 0170000
#define S_IFREG 0100000
char _license[] SEC("license") = "Dual BSD/GPL";
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, __u32);
__type(value, __u64);
} refused SEC(".maps");
static __always_inline void count_refused(void)
{
__u32 key = 0;
__u64 *value = bpf_map_lookup_elem(&refused, &key);
if (value)
__sync_fetch_and_add(value, 1);
}
static __always_inline bool name_is(const struct dentry *dentry,
const char *want, __u32 want_len)
{
const unsigned char *name = BPF_CORE_READ(dentry, d_name.name);
char buf[16] = {};
if (!dentry || BPF_CORE_READ(dentry, d_name.len) != want_len ||
want_len > sizeof(buf) - 1)
return false;
if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
return false;
for (__u32 i = 0; i < sizeof(buf) - 1; i++) {
if (i == want_len)
return true;
if (buf[i] != want[i])
return false;
}
return false;
}
static __always_inline bool is_root_dentry(const struct dentry *dentry)
{
return dentry && dentry == BPF_CORE_READ(dentry, d_parent);
}
static __always_inline bool is_allowed_etc_file(const struct dentry *dentry)
{
return name_is(dentry, "hosts", 5) ||
name_is(dentry, "resolv.conf", 11) ||
name_is(dentry, "nsswitch.conf", 13) ||
name_is(dentry, "localtime", 9) ||
name_is(dentry, "timezone", 8) ||
name_is(dentry, "ld.so.cache", 11) ||
name_is(dentry, "gai.conf", 8) ||
name_is(dentry, "host.conf", 9);
}
static __always_inline bool is_guarded_host_file(const struct dentry *dentry)
{
const struct dentry *parent = BPF_CORE_READ(dentry, d_parent);
const struct dentry *grand = BPF_CORE_READ(parent, d_parent);
umode_t mode = BPF_CORE_READ(dentry, d_inode, i_mode);
if ((mode & S_IFMT) != S_IFREG)
return false;
if (name_is(parent, "etc", 3) && is_root_dentry(grand))
return !is_allowed_etc_file(dentry);
if (name_is(parent, "root", 4) && is_root_dentry(grand))
return true;
if (name_is(grand, "home", 4) &&
is_root_dentry(BPF_CORE_READ(grand, d_parent)))
return true;
return false;
}
static __always_inline bool current_is_yacy(void)
{
struct task_struct *task = bpf_get_current_task_btf();
const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
const struct dentry *pwd = BPF_CORE_READ(task, fs, pwd.dentry);
return name_is(exe, "java", 4) && name_is(pwd, "yacy", 4);
}
static __always_inline int earlier_verdict(int ret)
{
return ret >= -4095 && ret < 0 ? ret : -EPERM;
}
SEC("lsm/file_open")
int BPF_PROG(cve_2026_82880_open, struct file *file, int ret)
{
const struct dentry *dentry = file->f_path.dentry;
if (ret)
return earlier_verdict(ret);
if (!is_guarded_host_file(dentry) || !current_is_yacy())
return 0;
count_refused();
return -EPERM;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-82880"
description = "Refuses local host file opens by YaCy Search Server to mitigate XML external entity injection CVE-2026-82880"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-82880-xxe-block.bpf.c"
[upatches.tree]
id = "cve-2026-82880-xxe-block"
fixes = ["CVE-2026-82880"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 31 Aug 2026CVECVE published
- 25 Nov 2026Pull requestPull request #62 openedAdd CVE-2026-82880: Refuses local host file opens by YaCy Search Server to mitigate XML externalromanlab
- 25 Nov 2026CIUpdate upatch.devpassed
- 25 Nov 2026CICIpassed
- 25 Nov 2026MergeMerged #62romanlab
No human review is recorded on GitHub for this upatch yet.
Evidence
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
| 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 |
tools-test.log Output of tools/test --setup before, while, and after loading cve-2026-82880-xxe-block.
tools/test --setup, 2026-11-25T13:46:36Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-82880 setup done YACY_URL=http://127.0.0.1:8090 before reached svgParser resolved file:///etc/hostname into the parsed title loaded blocked kernel refused svgParser opening /etc/hostname after reached svgParser resolved file:///etc/hostname into the parsed title PASS: reached before, blocked while loaded, reached again after
Use it
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.
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82880shirudo 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>