Skip to content

LDEV-3027 escape reflected request path in MissingIncludeException (CVE-2026-29519) - #2805

Open
allanoepping wants to merge 1 commit into
lucee:7.0from
allanoepping:LDEV-3027-missinginclude-path-xss
Open

LDEV-3027 escape reflected request path in MissingIncludeException (CVE-2026-29519)#2805
allanoepping wants to merge 1 commit into
lucee:7.0from
allanoepping:LDEV-3027-missinginclude-path-xss

Conversation

@allanoepping

Copy link
Copy Markdown

Summary

Fixes the reflected XSS in URL path parsing tracked as LDEV-3027 / CVE-2026-29519.

When a requested template cannot be found, Lucee raises a MissingIncludeException whose message and detail embed the requested path (PageSource.getRealpathWithVirtual() / getDisplayPath()). That text is rendered into the detailed error page unescaped, so an HTML/JS payload placed in a URL path segment executes in the victim's browser, e.g.:

http://host/foo/<img src=x onerror=alert(1)>/index.cfm/

The issue affects the 5.3.x, 6.1.x, 6.2.x and 7.0.x lines.

Fix

HTML-escape the requested path with StringUtil.escapeHTML at the single points where untrusted request-path data enters the exception message and detail — mirroring the existing escaping of the REST 404 path in PageContextImpl (HTMLEntities.escapeHTML(pathInfo)). Null-guarded with StringUtil.emptyIfNull, since escapeHTML NPEs on a null argument.

Test

Adds test/tickets/LDEV3027.cfc: triggers the exception via a payload-bearing missing include and asserts the message/detail contain no raw tag-open (<img, <script>) and instead the escaped form (&lt;img, &lt;script&gt;). Passes locally with mvn test -DtestFilter=LDEV3027.

Notes

…VE-2026-29519)

A request for a missing template reflects the requested path into the
detailed error page unescaped, enabling reflected XSS via HTML placed in a
URL path segment, e.g.:

    /foo/<img src=x onerror=alert(1)>/index.cfm/

The path flows through PageSource.getRealpathWithVirtual()/getDisplayPath()
into the MissingIncludeException message and detail, which are rendered into
the HTML error output without escaping.

Fix: HTML-escape the path with StringUtil.escapeHTML at the single points
where untrusted request-path data enters the exception message and detail,
mirroring the existing escaping of the REST 404 path in PageContextImpl.
Null-guarded with StringUtil.emptyIfNull (escapeHTML NPEs on null).

Adds test/tickets/LDEV3027.cfc covering img and script-tag payloads.
@CLAassistant

CLAassistant commented Aug 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants