Orc Discount Stack Exhaustion Vulnerability in Markdown Handler

Vulnerability

A stack exhaustion vulnerability has been identified in Orc Discount versions through 3.0.1.2. This issue resides in the Markdown Handler component, specifically within the compile function of markdown.c. The vulnerability allows for uncontrolled recursion, where the function can be tricked into processing excessively nested structures. This deep recursion exhausts the process stack, leading to a crash caused by a segmentation fault. The vulnerability requires local execution to exploit, and a public proof-of-concept exploit is available.

Impact

Exploitation of this vulnerability causes a stack overflow, leading to a segmentation fault and crashing the application.

Reproduction

The vulnerability can be reproduced by using the Orc Discount Markdown processor with a crafted Markdown file that contains deeply nested blockquote elements. This input will trigger the compile function to enter an uncontrolled recursion, eventually exhausting the stack space and causing the application to crash.

Remediation

No specific mitigation is known, but it is suggested to introduce a maximum nesting depth limit in the parsing logic to prevent excessive recursion.

Added: Mar 26, 2026, 2:19 AM
Updated: Mar 26, 2026, 2:19 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
5.6
remediation
0.0
relevance
4.7
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.