Disclosure summary
# HMAC validation bypass via multiple `.replace()` calls when removing URL signature ## Summary Thumbor’s HMAC validation can be bypassed due to the use of Python’s `.replace()` when removing the signature from the URL before validation. Since `.replace()` removes **all occurrences** of the substring, an attacker can insert the same signature multiple times in the URL and manipulate the final URL used for validation. This allows crafting URLs where the validated string differs from the actual requested resource, enabling loading images from unintended domains or paths. ## Details Thumbor signs URLs using **HMAC-SHA1** to prevent abuse such as loading arbitrary external images or invoking filters without authorization. During request validation, Thumbor removes the signature from the request URL before recalculating the HMAC. The relevant code: ```python url_signature = self.context.request.hash if url_signature: signer = self.context.modules.url_signer( self.context.server.security_key ) try: quoted_hash = quote(self.context.request.hash) except KeyError: self._error(400, f"Invalid hash: {self.context.request.hash}") return url_to_validate = url.replace( f"/{self.context.request.ha
Source-specific records & product guidance
Sources retain their own attribution and scoring. Follow the original record to confirm affected versions, fixed releases, and configuration conditions.
GitHub Reviewed Security Advisories · GHSA-mw3h-qjxj-6xg9
Open original source · Updated Sep 30, 2026
Thumbor has HMAC validation bypass via multiple .replace() calls when removing URL signature
Source severity: HIGH / 0
| Ecosystem | Package | Affected range | First patched |
|---|---|---|---|
| pip | thumbor | 7.8.0 |
Original records & references
- NIST NVD record
- CVE Program record
- github.com — Reviewed advisory
PUBLISHED 2026-07-31T14:51:54-04:00
MODIFIED 2026-09-30T14:44:07-04:00
INGESTED 2026-10-06T11:43:09-04:00