Jul 31, 2026·6 min read·5 visits
Unauthenticated remote attackers can trigger exponential CPU backtracking in Thumbor (< 7.8.0) via a crafted convolution filter parameter, causing a denial of service.
A critical Regular Expression Denial of Service (ReDoS) vulnerability exists in Thumbor prior to version 7.8.0. The vulnerability resides within the dynamic filter-parsing engine, specifically inside the 'convolution' filter parameter processing logic. Due to overlapping and nested quantifiers in the regular expression used to parse matrix values, a remote, unauthenticated attacker can supply a specially crafted, malformed filter payload inside a request URL. This causes Python's standard NFA-based regular expression engine to undergo exponential backtracking, exhausting CPU resources and leading to a complete Denial of Service.
Thumbor is an open-source smart imaging service that processes, resizes, and filters images on demand. It features a wide array of filters, such as convolution, which allows users to define custom spatial filters using matrix-based operations. The application is designed to be highly accessible and performance-focused, often integrated into high-traffic web environments to serve dynamic assets.
To handle requests efficiently, Thumbor relies on the Tornado web framework. Tornado uses an asynchronous, single-threaded event loop architecture to handle multiple concurrent network connections. While this model is highly efficient for I/O-bound tasks, it is susceptible to starvation when processing CPU-bound tasks.
The filter-parsing mechanism represents a substantial attack surface. When parsing filter options directly from the URL path, Thumbor uses regular expressions to validate and extract parameter sets. In the case of the convolution filter, a flaw in the regular expression design allows unauthenticated users to trigger exponential execution times, completely blocking the single-threaded worker process.
The root cause of this vulnerability lies in the design of the regular expression utilized by the convolution filter parser. Specifically, the parser attempts to validate a list of semicolon-separated matrix coefficients. The vulnerable pattern is defined as (?:[-]?[\d]+\.?[\d]*[;])*(?:[-]?[\d]+\.?[\d]*). This structure contains nested and overlapping quantifiers.
Python's native re module uses a Non-deterministic Finite Automaton (NFA) engine. When matching a target string, an NFA engine processes inputs by exploring potential paths. If a path fails to match, the engine backtracks to try alternative configurations. Overlapping quantifiers within the subpatterns allow a single string to be interpreted in multiple ways, causing the engine to evaluate a massive state space before returning a mismatch.
The subpattern [-]?[\d]+\.?[\d]* contains ambiguity because a string of digits (e.g., 11) can be matched by [\d]+ entirely, or divided between [\d]+ and [\d]*. Furthermore, nesting this pattern inside a repeating group followed by a trailing duplicate pattern creates an exponential search complexity. On malformed input that fails at the final step, the engine attempts $2^N$ backtracking combinations for $N$ parameters, driving CPU utilization to 100%.
To analyze the flaw, we can inspect the core filter file thumbor/filters/convolution.py. Before the security patch, the filter registration decorator defined the following evaluation regex:
# Vulnerable regex definition in thumbor/filters/convolution.py
@filter_method(
r"(?:[-]?[\d]+\.?[\d]*[;])*(?:[-]?[\d]+\.?[\d]*)",
BaseFilter.PositiveNonZeroNumber,
BaseFilter.Boolean,
)In this implementation, the Kleene star on the non-capturing group (?:...)* matches any number of semicolon-terminated matrix items, while the subsequent pattern handles the final matrix element. Because both patterns utilize the ambiguous float-matching regex, the boundary between items becomes indistinct during failures.
The security patch refactored the regular expression to ensure a strict, linear matching behavior. The updated decorator is defined as:
# Patched regex definition in thumbor/filters/convolution.py
@filter_method(
r"-?[\d]+(?:\.[\d]*)?(?:;-?[\d]+(?:\.[\d]*)?)*",
BaseFilter.PositiveNonZeroNumber,
BaseFilter.Boolean,
)The new regex eliminates the overlapping parsing states. By explicitly separating integers and decimal points ((?:\.[\d]*)?) and changing the loop structure from (A;)*A to A(?:;A)*, the parser matches matrix elements deterministically. There is only one valid traversal path per character sequence, reducing execution complexity from $O(2^N)$ to $O(N)$.
Exploitation of CVE-2026-53504 is straightforward and requires only network access to the target instance. The attacker must submit a malformed request pointing to the convolution filter. Since the regular expression requires trailing parameters (like column count and normalization flag) to match successfully, omitting these parameters forces the parser to evaluate the entire sequence and fail.
A typical exploit payload consists of a standard Thumbor image request URL with an elongated list of negative integers:
GET /unsafe/filters:convolution(-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11;-11)/path/to/image.jpg HTTP/1.1
Host: target-thumbor-instance.localWhen the Tornado backend receives this request, it attempts to match the filter parameters against the registered regular expressions. The NFA engine begins to parse the 30 semicolon-separated values. Upon reaching the end of the convolution argument block, the engine detects that the required trailing values are missing, causing a mismatch. It then begins to backtrack through every permutation of the digit groupings. This process requires over one billion state evaluations, keeping the Tornado worker thread at 100% CPU capacity for several minutes.
The impact of this vulnerability is a complete Denial of Service (DoS) affecting the image rendering pipeline. Because Thumbor processes are typically bound to a single thread using the Tornado event loop, a single malformed HTTP request can completely block the thread. This halts the processing of all other concurrent requests handled by that specific worker process.
In environments where multiple workers are deployed, an attacker can scale the attack by sending a small burst of requests (one per worker process). This easily exhausts the entire backend pool. Since CPU resources are fully consumed by the backtracking loop, the underlying server instances also experience severe performance degradation, potentially impacting other services hosted on the same infrastructure.
This vulnerability does not allow for remote code execution, privilege escalation, or direct data leakage. However, its high reliability and low complexity make it an effective tool for disruption. It receives a CVSS v3.1 score of 7.5, indicating High severity due to its critical impact on service availability.
The primary remediation step is to upgrade the Thumbor installation to version 7.8.0 or later. This release updates the convolution filter regular expression, removing the nested quantifiers and ensuring linear matching times.
For environments where an immediate upgrade is not feasible, several defensive workarounds can be implemented. If the convolution filter is not required by the application, it can be disabled or removed from the active filter list within the Thumbor configuration file (thumbor.conf).
Alternatively, network-level web application firewalls (WAFs) can be configured to inspect incoming URLs. Rules should block requests containing abnormally long arguments within the filters:convolution block. Setting up strict rate limiting and ensuring that the event loop can timeout slow operations also helps mitigate the severity of resource exhaustion attacks.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Thumbor globo.com | < 7.8.0 | 7.8.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 (Uncontrolled Resource Consumption) |
| Attack Vector | Network (AV:N) |
| Attack Complexity | Low (AC:L) |
| Privileges Required | None (PR:N) |
| User Interaction | None (UI:N) |
| CVSS v3.1 Score | 7.5 (High) |
| Exploit Status | Proof-of-Concept |
| KEV Status | Not Listed |
The product does not properly control the allocation and maintenance of a limited resource, enabling an actor to influence the amount of resources consumed, leading to eventual exhaustion.
Improper input validation of the supiOrSuci field in free5GC Authentication Server Function (AUSF) allows unauthenticated remote attackers to trigger an unhandled parsing exception, resulting in a Denial of Service (DoS) and internal stack trace exposure.
The zaino-state crate contains two critical flaws in its block reorganization and state synchronization logic. An unbounded recursive async function handling block reorganization fails to validate cyclic relationships, enabling network peers to cause infinite loops that exhaust CPU and memory resources. Furthermore, a logical pruning error during non-finalized block cache trimming can purge all cached blocks, triggering an immediate panic and crash of the daemon.
CVE-2026-54737 is a high-severity Prototype Pollution vulnerability in the @phun-ky/defaults-deep npm library prior to version 2.0.5. Due to unsafe recursive object merging, unauthenticated attackers can supply structured payloads that modify the properties of Object.prototype, compromising the runtime process state.
CVE-2026-54729 is a critical Server-Side Request Forgery (SSRF) bypass vulnerability in the dssrf-js Node.js library prior to version 1.0.5. The flaw occurs because the library's DNS validation mechanism incorrectly treats domains like 'localhost' as safe when the configured upstream DNS resolver returns NXDOMAIN. Since the system's HTTP client later falls back to OS-level resolution (resolving 'localhost' to '127.0.0.1'), attackers can bypass validation and access internal loopback addresses.
A template injection vulnerability in @dynatrace-oss/dynatrace-mcp-server allows untrusted input to be interpolated directly into Dynatrace Workflows using Jinja2 syntax, leading to persistent data exposure and exfiltration.
An uncontrolled resource consumption vulnerability (CWE-400) in OliveTin allows unauthenticated remote attackers to exhaust server memory and trigger a denial of service (DoS). By repeatedly initiating the OAuth2 login flow without completing it, attackers can force the server to allocate state variables in an unbounded in-memory map. This heap-based resource exhaustion eventually causes the host operating system to terminate the OliveTin process via the Out-Of-Memory (OOM) killer.