Skip to content

Commit 2e96dd0

Browse files
committed
[SECURITY] Encode indexed search results in frontend rendering
Encodes user-submitted content before rendering search results in the frontend to mitigate cross-site scripting vulnerabilities. Resolves: #109695 Releases: main, 14.3, 13.4 Change-Id: Icdeb7e841ce503b79086e37743a7e196581bbb14 Security-Bulletin: TYPO3-CORE-SA-2026-010 Security-References: CVE-2026-47348 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/94407 Tested-by: Oliver Hader <oliver.hader@typo3.org> Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
1 parent 3ffc083 commit 2e96dd0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

typo3/sysext/indexed_search/Classes/Controller/SearchController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,15 @@ protected function compileSingleResultRow(array $searchData, array $row, int $he
399399
}
400400
$title = $resultData['item_title'] . ($resultData['titleaddition'] ?? '');
401401
$title = GeneralUtility::fixed_lgd_cs($title, (int)$this->settings['results.']['titleCropAfter'], $this->settings['results.']['titleCropSignifier']);
402+
$title = htmlspecialchars($title);
402403
// If external media, link to the media-file instead.
403404
if ($row['item_type']) {
404405
if ($row['show_resume']) {
405406
$targetAttribute = '';
406407
if ($typoScriptConfigArray['fileTarget'] ?? false) {
407408
$targetAttribute = ' target="' . htmlspecialchars($typoScriptConfigArray['fileTarget']) . '"';
408409
}
409-
$title = '<a href="' . htmlspecialchars($row['data_filename']) . '"' . $targetAttribute . '>' . htmlspecialchars($title) . '</a>';
410+
$title = '<a href="' . htmlspecialchars($row['data_filename']) . '"' . $targetAttribute . '>' . $title . '</a>';
410411
} else {
411412
// Suspicious, so linking to page instead...
412413
$copiedRow = $row;

0 commit comments

Comments
 (0)