LDEV-3027 escape reflected request path in MissingIncludeException (CVE-2026-29519) - #2805
Open
allanoepping wants to merge 1 commit into
Open
LDEV-3027 escape reflected request path in MissingIncludeException (CVE-2026-29519)#2805allanoepping wants to merge 1 commit into
allanoepping wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MissingIncludeExceptionwhose 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.: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.escapeHTMLat the single points where untrusted request-path data enters the exception message and detail — mirroring the existing escaping of the REST 404 path inPageContextImpl(HTMLEntities.escapeHTML(pathInfo)). Null-guarded withStringUtil.emptyIfNull, sinceescapeHTMLNPEs 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 (<img,<script>). Passes locally withmvn test -DtestFilter=LDEV3027.Notes
7.0(active stable). Backport candidate for the6.2LTS line and the other affected branches.