Atom entry xml:base leaks into later sibling links and images
Categories
(MailNews Core :: Feed Reader, defect)
Tracking
(thunderbird159 affected)
| Tracking | Status | |
|---|---|---|
| thunderbird159 | --- | affected |
People
(Reporter: nguyentuanhung1149, Unassigned)
Details
Attachments
(3 files)
Tested: Thunderbird Daily 159.0a1, build 20261003100540, Linux x86_64; comm-central fd6ee9a9bd64e360a9dbb737e2d0fab4e395fbf0. Reproduced in disposable profiles with localhost-only feeds.
Steps to reproduce:
- Serve the attached atom-sibling-base.xml as http://127.0.0.1:8765/root/feed.xml, or change its localhost port/base URI consistently and serve it from that address.
- In Thunderbird, add an RSS account and subscribe to that URL. Two articles, "First" and "Second", are stored.
- Inspect the second article's Website link and message source. The first entry has xml:base="http://127.0.0.1:8765/first/"; the second entry has no xml:base and has a relative link "article.html".
Expected:
The second entry inherits the feed element's xml:base, not its sibling's. Its link resolves to http://127.0.0.1:8765/root/article.html and its HTML base is http://127.0.0.1:8765/root/. This follows XML Base inheritance and Atom RFC 4287.
Actual:
The second entry resolves its link to http://127.0.0.1:8765/first/article.html, and the stored message has <base href="http://127.0.0.1:8765/first/">. Two independent feed downloads and a subscription through the Feed Subscriptions window reproduced this, saving two messages each time.
Impact check:
The attached atom-cross-origin-base.xml sets only the first entry's xml:base to a different localhost origin (port 8768). In Thunderbird's message pane, the second entry's relative detail.html link resolves to that origin rather than the feed's port 8765. Its relative image also causes a GET to port 8768 when the second entry is opened: two GETs in two runs. A parent-base control produced the port-8765 link and zero GETs to port 8768. An explicit absolute image URL also loads in a feed message, so this is evidence of the wrong destination, not a claimed remote-content-policy bypass. No privilege bypass or restricted-data access was demonstrated.
Likely cause:
FeedParser.sys.mjs, parseAsAtomIETF(), carries a mutable contentBase between entry iterations: contentBase = itemNode.getAttribute("xml:base") || contentBase (line 831 in this revision). A sibling without xml:base therefore inherits the previous entry's value. A local regression test was prepared; the equivalent parser and message-pane probes fail against this build. The xpcshell harness itself was unavailable in this environment.
Duplicate check:
Bugzilla MailNews Core / Feed Reader summary searches for xml:base, relative, base and Atom found no matching sibling-inheritance report. Bug 1671237 concerns invalid RSS relative links; bug 1345358 concerns badly formed Content-Base URLs. Previously reported issues 2064660, 2047970, 1979019, 2053187, 2052115 and 2069080 describe other behavior.
References: https://www.w3.org/TR/xmlbase/ ; https://www.rfc-editor.org/rfc/rfc4287 ; https://searchfox.org/comm-central/rev/fd6ee9a9bd64e360a9dbb737e2d0fab4e395fbf0/mailnews/extensions/newsblog/FeedParser.sys.mjs
Credit: Nguyen Tuan Hung (nguyentuanhung1149@gmail.com), VNU HCM - UIT
| Reporter | ||
Comment 1•1 month ago
|
||
| Reporter | ||
Comment 2•1 month ago
|
||
| Reporter | ||
Comment 3•1 month ago
|
||
Comment 4•1 month ago
|
||
(not a new version issue unless determined otherwise by regression testing)
Description
•