#111472dumpFile token does not bind parameter keys: processing options can be swapped (thumbnail/crop bypass)
Description
The eID=dumpFile token is HMAC(implode('|', $parameters), 'resourceStorageDumpFile').
FileDumpController::buildParametersFromRequest() builds $parameters in a fixed order (eID, t, f, r, p, s, cv, dl, fn), drops empty values and signs only the values. Two requests whose non-empty values are equal and in the same order therefore produce the same signed string, regardless of which keys carry them.
The fix for #110316 binds t to exactly one of the selectors f, r, p. The option keys are not covered: s, cv, dl and fn can still trade values with each other, and each of them changes what is delivered:
s: scaling / thumbnail (dumpAction(), “Apply width/height”)cv: crop variant of a sys_file_reference (dumpAction(), “Apply cropping”)dl: download disposition (cast to int)fn: alternative file name, any string, no processing
A token issued for a processed variant of a protected file can therefore be replayed to obtain the unprocessed original of the same file.
Affected code
typo3/sysext/core/Classes/Resource/Service/FileDumpService.php:isTokenValid()/createToken()(implode('|', $parameters)), used byFileDumpController::dumpAction()andindexed_search\Indexer::createFileFromFileDumpUrl()typo3/sysext/core/Classes/Controller/FileDumpController.php:buildParametersFromRequest(),dumpAction()- token generation with the same construction:
typo3/sysext/core/Classes/Resource/ResourceStorage.php(getPublicUrl(), ~1496-1506)typo3/sysext/fluid/Classes/ViewHelpers/Link/FileViewHelper.php(~109-130)typo3/sysext/form/Classes/Slot/ResourcePublicationSlot.php(~75-84)typo3/sysext/indexed_search/Classes/Indexer.php(~518-559, token validation)
CropVariantCollection::getCropArea()returnsArea::createEmpty()for an unknown variant, so a misplacedcvvalue silently means “no crop”- documented API:
Feature-90068-ImplementBetterFileDumpController.rstshows signingsandcvfor exactly this purpose
Reproduced against the released fix for #110316: a token signed for a 300×200 thumbnail of a protected file, replayed with the value moved from s to fn, returns HTTP 200 with the 1200×800 original (byte-identical). The same works moving cv=default into fn: the crop that hid half of the image is dropped. So this is not closed by the selector-consistency fix. Evidence in the security case material (change-95216).
All branches with the 10.3 FileDumpController API are affected (10.4 – main). Confirmed on main, not yet verified per other branch.
Prerequisites
- an extension or project issues dumpFile tokens that include
sand/orcvfor a file that is otherwise not accessible (non-public storage or aModifyFileDumpEventlistener), following the #90068 documentation, to grant thumbnail-only or crop-only access - the attacker obtains one such URL (e.g. the thumbnail shown to them)
Core alone never signs s or cv. ResourceStorage and the form slot sign t plus the selector; FileViewHelper additionally signs dl and fn, with fn restricted to [0-9a-z._-]. With Core-issued tokens only, a value can move between dl/@fn@ and s/@cv@, which changes processing or naming but discloses nothing.
Attack
Signed string for t=f&f=1&s=320c:280c: dumpFile|f|1|320c:280c.
- Thumbnail to original: replay as
t=f&f=1&fn=320c:280cwith the same token. Same signed string, no processing instructions,streamFile()sends the original file in full resolution. - Crop removed: a token for
t=r&r=5&cv=defaultreplayed ast=r&r=5&fn=default(ors=default) delivers the full image of the reference. Relevant where the crop hides part of the image. - Combined: a token for
s=<S>&cv=<C>replayed ascv=<S>&fn=<C>; the unknown crop variant yields an empty area, no size is applied, the original is delivered.
ModifyFileDumpEvent listeners do not catch this: they receive the file object and the request, not the signed processing instructions, so a listener that grants access to “this reference” grants the original as well.
The resolved object stays the same. Access to a different file is not possible (closed by #110316).
Suggested fix
- Sign an unambiguous encoding of keys and values, e.g.
http_build_query()orjson_encode()of the parameter array, in one place (FileDumpService), and use it from all generators listed above instead of four copies ofhmac(implode('|', …)). - Keep cached and stored URLs working: accept the legacy format only as long as the request carries no
sand nocv. All Core-issued URLs fall into that case, so only the documented extension use case is forced onto the new format.
Reviews 1
History 13
-
Gerrit Code Review changed status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-17T13:00:25+00:00" > 11/17/26, 13:00 </span> Patch set 1 for branch *main* of project *Teams/Security/TYPO3v4-Core* has been pushed to the review server. It is available at https://review.typo3.org/c/Teams/Security/TYPO3v4-Core/+/97748 -
Oliver Bartsch changed tracker
BugTask project id category TYPO3 Version1015 <span data-processor="relativetime" data-value="2026-11-17T15:28:56+00:00" > 11/17/26, 15:28 </span> -
Gerrit Code Review pushed patch set 1 for main to change 97754 <span data-processor="relativetime" data-value="2026-11-17T15:40:50+00:00" > 11/17/26, 15:40 </span>