CVE-2026-46637
Analyzed Analyzed - Analysis Complete

Twig Markdown and CSS Inliner Filters Safe Output Bypass

Vulnerability report for CVE-2026-46637, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-14

Last updated on: 2026-07-16

Assigner: GitHub, Inc.

Description

Twig is a template language for PHP. Prior to 3.26.0, several filters in twig/markdown-extra and twig/cssinliner-extra are registered with is_safe => [all], causing Twig to treat plain text or HTML output as safe in HTML, JavaScript, CSS, URL, and other contexts where the output is not properly escaped. This issue is fixed in version 3.26.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-14
Last Modified
2026-07-16
Generated
2026-08-04
AI Q&A
2026-07-15
EPSS Evaluated
2026-08-02
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
symfony twig to 3.26.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Twig is a PHP template language. Prior to version 3.26.0, certain filters in twig/markdown-extra and twig/cssinliner-extra were incorrectly marked as safe for all contexts. This means Twig would not escape their output, allowing plain text or HTML to be treated as safe in HTML, JavaScript, CSS, URLs, and other contexts where proper escaping is required.

Detection Guidance

This vulnerability can be detected by checking the installed versions of Twig and its extensions. Run commands like 'composer show twig/twig' or 'composer show twig/markdown-extra' to verify if versions are below 3.26.0. Inspect template files for unsafe filter usage.

Impact Analysis

This vulnerability could allow an attacker to inject malicious code into your application if you use the affected filters. This might lead to cross-site scripting (XSS) attacks, data theft, or unauthorized actions on behalf of users. The impact depends on how the application processes user input and renders output.

Compliance Impact

This vulnerability could lead to data breaches or unauthorized access, violating GDPR's data protection requirements and HIPAA's security rules. Non-compliance may result in legal penalties, fines, or reputational damage due to inadequate safeguards against XSS or code injection.

Mitigation Strategies

Upgrade Twig to version 3.26.0 or later to address the issue with unsafe filter registration in twig/markdown-extra and twig/cssinliner-extra.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-46637. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart