CVE-2026-133773 in markdown-extrainfo

Summary

by MITRE • 11/24/2026

The html_to_markdown filter of twig/markdown-extra keeps an HtmlConverter for each distinct mapping of options it receives. They're kept in a static array, with no size limit and no eviction. The options are an argument of the filter. A template that passes options taken from the input, or a sandboxed template, can therefore make this cache grow without limit. The cache outlives the environment, so it fills the memory of long-running workers.

The cache now keeps at most 100 converters, like the formatter caches of IntlExtension.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

This vulnerability represents a classic resource exhaustion flaw within the twig/markdown-extra library, specifically affecting the html_to_markdown filter implementation. The core technical issue stems from an unbounded static caching mechanism designed to optimize performance by reusing HtmlConverter instances based on specific option mappings. When the filter is invoked with a unique set of configuration options, the system creates and stores a new converter instance in a static array associated with that particular key combination. Because this cache operates without any maximum size constraint or eviction policy such as least recently used logic, it accumulates entries indefinitely over time. This design choice assumes that the number of distinct option configurations will remain small and stable, which is often true for static templates but fails catastrophically when dynamic input influences those options.

The operational impact becomes severe in environments where user-supplied data directly or indirectly determines the parameters passed to this filter. If a template accepts external input and uses it to construct the options array for html_to_markdown, each unique variation of that input generates a new cache entry. In long-running worker processes common in modern web applications, these entries persist across multiple requests because static variables retain their state between executions. Consequently, memory consumption grows linearly with the number of distinct option combinations encountered by attackers or even legitimate users generating diverse content patterns. This leads to progressive memory bloat that can eventually trigger out-of-memory errors, causing application crashes, service unavailability, and denial of service conditions for all connected clients sharing the same worker process.

From a security classification perspective, this flaw aligns with CWE-400, which describes Uncontrolled Resource Consumption. The lack of an upper bound on cached objects allows attackers to exhaust system resources through simple repeated requests with varying parameters. In terms of attack vectors and tactics, this vulnerability supports techniques associated with the ATT&CK framework under resource hijacking or denial of service categories, where adversaries leverage application logic flaws to degrade availability rather than compromising confidentiality or integrity directly. The persistence of these objects beyond the lifecycle of individual request contexts exacerbates the severity, as cleanup does not occur automatically upon request completion.

To mitigate this vulnerability, it is critical to implement a bounded cache strategy similar to those used in other extensions like IntlExtension within the same ecosystem. Limiting the maximum number of stored converters to a reasonable threshold, such as one hundred instances, ensures that memory usage remains predictable and controlled regardless of input diversity. Implementing an eviction policy based on recency or frequency of use allows the system to discard less relevant converter configurations while retaining frequently used ones for performance optimization. Additionally, developers should avoid passing user-controlled data directly into filter options without sanitization or normalization steps that reduce the entropy of possible option combinations. Regular monitoring of memory usage in long-running processes can also help detect early signs of cache growth before it impacts service stability.

Responsible

Symfony

Reservation

11/20/2026

Disclosure

11/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00581

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!