Summary
changedetection.io versions 0.54.9 and earlier parse XML/RSS responses using an XML parser that does not explicitly disable external entities, DTD loading, or network-backed entity resolution.
When an attacker can influence the XML content processed by xpath_filter(), this configuration may enable XML External Entity (XXE) attacks, potentially exposing internal files or services during change detection.
Affected context
The issue appears in the XML/RSS handling path of changedetection.io, specifically when xpath_filter() switches into XML mode and processes untrusted XML bytes.
It affects deployments that:
- Monitor or fetch remote XML/RSS feeds or endpoints that can be controlled or influenced by an attacker
- Use
xpath_filter()or related features that parse response content as XML - Run the changedetection.io service with network access or access to local files that should not be exposed
Exploit preconditions
- Attack surface: HTTP(S) or similar endpoints that changedetection.io monitors and interprets as XML/RSS.
- Required access: Ability to host, modify, or influence the XML content retrieved by changedetection.io (e.g., control over a monitored URL, DNS, or an upstream service).
- Trigger point: The moment
xpath_filter()receives XML/RSS content and invokesetree.fromstring()with a parser that allows external entity resolution and DTD processing. - Why exploitation is possible: The XML parser is created without explicitly disabling external entities, external DTD loading, or network-backed entity resolution, allowing crafted XML documents to reference local files or internal network resources.
Why this happens
This vulnerability stems from the use of a general-purpose XML parser (etree.XMLParser(strip_cdata=False)) that does not opt out of risky XML features when processing untrusted data.
In this configuration, features such as external entity resolution and DTD loading can remain enabled.
When etree.fromstring() is used directly on attacker-controlled XML, the parser may automatically fetch and expand external entities, including references to local files or internal network resources.
This behavior maps to CWE-611: Improper Restriction of XML External Entity Reference, where an application fails to properly configure XML parsers to treat external entities as unsafe in untrusted inputs.
Potential impact
- Read access to sensitive local files that the service account can access (e.g., configuration, credentials, or application logs)
- Server-Side Request Forgery (SSRF) against internal or external services referenced by XML entities
- Discovery of internal network structure or service endpoints via blind responses
- Potential amplification of other vulnerabilities if internal services or metadata endpoints are exposed through XXE
General mitigation guidance
Effective mitigation focuses on hardening XML parsing and reducing trust in external content:
- Configure XML parsers in a hardened mode that disables external entities, DTD processing, and network-based fetching for any untrusted input.
- Prefer XML libraries or helper utilities that are secure-by-default for untrusted data, or use explicit "defused" XML variants where available.
- Treat all remotely sourced XML/RSS as untrusted, regardless of origin, and restrict what the application does in response to parsed content.
- Run the application with least-privilege OS accounts and minimize local file and network access rights to reduce the blast radius if XML parsing is abused.
- Consider applying allowlists or strict content validation for XML/RSS feeds before passing them to XPath or other downstream logic.
How teams detect issues like this
Organizations can look for this pattern using:
- Static analysis: Rules or custom checks that flag XML parsing via
etree.XMLParser/fromstringwhere secure flags are not set, or where external entities/DTDs are not explicitly disabled. - Code review: Manual audits focusing on any code paths that parse XML/RSS, ensuring that parser configuration treats all external entities as untrusted.
- Policy enforcement: Development guidelines that mandate hardened XML parsing utilities and prohibit raw use of XML parsers on untrusted bytes.
- Runtime monitoring: Network analytics and logs to identify unexpected outbound requests or file access patterns that could indicate XXE exploitation attempts.

