Skip to content

Commit dadc804

Browse files
committed
Security: XPath json-doc() Arbitrary File Read Bypass ( Similar fix as CVE-2026-29039 )
1 parent 65517a9 commit dadc804

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

changedetectionio/html_tools.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ def __init__(self, msg):
7070
'unparsed-text-available',
7171
'doc',
7272
'doc-available',
73+
'json-doc',
74+
'json-doc-available',
75+
'collection', # XPath 2.0+: loads XML node collections from arbitrary URIs
76+
'uri-collection', # XPath 3.0+: enumerates URIs from resource collections
77+
'transform', # XPath 3.1: XSLT transformation (currently raises, block proactively)
78+
'load-xquery-module', # XPath 3.1: loads XQuery modules (currently raises, block proactively)
7379
'environment-variable',
7480
'available-environment-variables',
7581
]

changedetectionio/tests/test_xpath_selector.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ def test_xpath_blocked_functions_unit():
610610
"unparsed-text-available('file:///etc/passwd')",
611611
"doc('file:///etc/passwd')",
612612
"doc-available('file:///etc/passwd')",
613+
"json-doc('file:///datastore/changedetection.json')",
614+
"collection('file:///datastore/')",
615+
"uri-collection('file:///datastore/')",
616+
"transform(map{})",
617+
"load-xquery-module('foo')",
613618
"environment-variable('PATH')",
614619
"available-environment-variables()",
615620
]

0 commit comments

Comments
 (0)