Kramdown Template Option Processing Vulnerability Allowing File Read and Code Execution

Vulnerability

A vulnerability exists in the kramdown gem, specifically in versions prior to 2.3.0, within the default processing of the 'template' option in Kramdown documents. This behavior can lead to unintended read access to sensitive files, such as '/etc/passwd', or unauthorized execution of embedded Ruby code. The vulnerability is triggered when the '{::options}' extension is used with the 'template' option, allowing crafted input to be processed in a way that could execute arbitrary code or access restricted files. Kramdown is a Markdown parser and converter written in Ruby, and this vulnerability affects multiple NetApp products that incorporate Ruby.

Impact

Exploitation of this vulnerability could result in unauthorized read access to sensitive files, execution of arbitrary Ruby code, or a denial-of-service condition.

Reproduction

To reproduce this vulnerability, create a Kramdown document that includes the '{::options template="/etc/passwd"}' directive. This can be done by using the Kramdown command-line tool or by incorporating the vulnerable version of the kramdown gem into a Ruby application. When the document is processed, the 'template' option will be applied by default, leading to the unintended read access or code execution.

Remediation

Users can upgrade to kramdown version 2.3.0 or later, where this vulnerability has been addressed. Instructions for updating can be found in the RubyGems documentation.

Added: Mar 30, 2026, 9:22 AM
Updated: Mar 30, 2026, 9:22 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.0
remediation
0.0
relevance
0.0
threat
5.0
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.