PatchSiren cyber security CVE debrief
CVE-2026-46628 twigphp CVE debrief
The CVE-2026-46628 record describes a security vulnerability in the Twig template language for PHP, specifically in the deprecated spaceless filter prior to version 3.26.0. This filter is registered as safe for HTML, causing Twig autoescaping to emit attacker-controlled markup unescaped when spaceless is applied to untrusted input. The vulnerability allows attackers to inject malicious HTML code. The issue is fixed in version 3.26.0. Developers and administrators using Twig template language for PHP, especially those who handle user-input data, should be aware of this security vulnerability and take necessary precautions.
- Vendor
- twigphp
- Product
- Twig
- CVSS
- MEDIUM 5.1
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-07-14
- Original CVE updated
- 2026-07-16
- Advisory published
- 2026-07-14
- Advisory updated
- 2026-07-16
Who should care
Developers and administrators using Twig template language for PHP, especially those who handle user-input data, should be aware of this security vulnerability. They should review their usage of the spaceless filter and update to version 3.26.0 or later to prevent potential attacks. Additionally, security teams and vulnerability management teams should be aware of this vulnerability and track its exposure in their environments.
Technical summary
The deprecated spaceless filter in Twig template language for PHP, prior to version 3.26.0, is registered as safe for HTML. This causes Twig autoescaping to emit attacker-controlled markup unescaped when spaceless is applied to untrusted input, allowing attackers to inject malicious HTML code. The vulnerability requires specific conditions to be exploited, but can have significant impact if exploited. Users should update to version 3.26.0 or later and review their usage of the spaceless filter.
Defensive priority
Medium priority, as the vulnerability requires specific conditions to be exploited, but can have significant impact if exploited.
Recommended defensive actions
- Update Twig to version 3.26.0 or later
- Review and validate user-input data
- Implement additional security measures, such as input validation and output encoding
- Review compensating controls for exposed systems while remediation is scheduled and verified
- Check relevant monitoring, detection, and logs for exposed assets that need extra review
- Track exceptions, retest remediated assets, and close the item only after evidence is documented
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
Evidence notes
The CVE record and NVD detail provide information on the vulnerability, its impact, and the fixed version. The vendor advisory and patch information are available through the provided resource links. Evidence limits suggest that additional information may exist but is not currently publicly available. Defenders should verify the affected scope, severity, and vendor guidance with the official advisory. Limited source detail is provided, and users should review the CVE record and NVD detail for further information.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-46628 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-46628
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-46628 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-46628
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/commit/3190b9ae12614dfd58cc5d8f394bac4708b17913
[email protected] - Patch
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/releases/tag/v3.26.0
[email protected] - Release Notes
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7
[email protected] - Vendor Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.