Summary
YaCy Search Server contains an XML external entity injection vulnerability in parsers for SVG, FreeMind, and OpenSearch documents. An attacker who can publish or submit a malicious document may cause the crawler to read local files and place their contents into the searchable index.
Affected context
The vulnerability occurs in YaCy deployments that crawl or process attacker-controlled SVG, FreeMind, or OpenSearch documents while XML external entity resolution remains enabled. Risk depends on whether the crawler can access sensitive local files and whether the resulting indexed content is accessible to the attacker or other unauthorized users.
Exploit preconditions
- Attack surface: YaCy document ingestion and crawling parsers
- Required access: Ability to publish, submit, or otherwise cause YaCy to process a malicious supported document
- Trigger point: XML parsing of a document containing a DOCTYPE declaration and external entity reference
- Why exploitation is possible: The affected parsers may resolve external entities and read local resources before content is indexed
Why this happens
The underlying bug is insecure XML parser configuration. External entity resolution is not disabled for parser paths that process attacker-controlled document formats, allowing XML declarations to reference local or remote resources during parsing.
This behavior maps to CWE-611: Improper Restriction of XML External Entity Reference, where untrusted XML can cause unintended resource retrieval or local file disclosure.
Potential impact
- Sensitive local files may be disclosed
- Exfiltrated content could be added to the searchable index
- Credentials, configuration data, or application secrets could be exposed
- Indexed information could be accessible to unauthorized search users
- Server-side requests to reachable resources could occur, depending on parser behavior
General mitigation guidance
Mitigation generally focuses on making XML processing safe by default and reducing trust in submitted documents.
Common defensive patterns include:
- Disabling external general and parameter entity resolution
- Rejecting or restricting DOCTYPE declarations where they are not required
- Using hardened XML parsers with local and network resource access disabled
- Validating documents against narrowly defined schemas or formats
- Limiting crawler filesystem permissions and network reachability
- Applying least-privilege access controls to indexed content
- Separating document-processing workers from sensitive host resources
How teams detect issues like this
Organizations can detect this class of issue through:
- Static analysis checks for XML parser configurations that leave entity resolution enabled
- Code review of every parser used for attacker-controlled document formats
- Tests using benign external-entity fixtures to verify that resolution is blocked
- Monitoring crawler activity for unexpected file reads or outbound requests
- Index audits for sensitive paths, credentials, or configuration content
- Policy enforcement requiring hardened XML parsing defaults across services
Automated security review tools may help identify unsafe XML parser settings and untrusted document ingestion paths.

