Issue Bug Resolved

#111242Harden output escaping of QR code form element

Torben Hansen 10/25/26, 16:48 updated 11/03/26, 12:10

Description

The FormEngine element qrCode of EXT:redirects (QrCodeElement::render()) renders the content attribute of the <typo3-qrcode> component by concatenating the record’s source_host and source_path without escaping:

content="https://' . $sourceHost . $sourcePath . '"

A backend user with write access to sys_redirect can, by sending a manipulated DataHandler request (the field is not part of the QR code form and is generated automatically), store a source_path that ends this attribute, so additional markup ends up in the record edit form of a QR code redirect.

This does not lead to Cross-Site Scripting: the backend Content Security Policy is always enforced since TYPO3 v13 and cannot be disabled by configuration. Its script-src directive does not allow inline scripts or event handler attributes, so injected markup cannot execute JavaScript.

Since the QR code element only exists in TYPO3 v14, every affected version is protected by this policy. This issue is therefore handled as hardening and not as a security vulnerability.

The value should nevertheless be escaped with htmlspecialchars(), as the sibling element ShortUrlElement already does for the corresponding URL. ++

Reviews 2

History 13

  1. Torben Hansen commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-03T12:10:17+00:00" > 11/03/26, 12:10 </span>

    Applied in changeset commit:a510bd06dccb8eed42f89a7818402b0cd4b03087.