Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 88%

CVE-2026-49981: CWE-693: Protection Mechanism Failure in twigphp Twig

0
Medium
VulnerabilityCVE-2026-49981cvecve-2026-49981cwe-693cwe-863
Published: 07/14/2026 (07/14/2026, 21:26:00 UTC)
Source: CVE Database V5
Vendor/Project: twigphp
Product: Twig

Description

Twig is a template language for PHP. Prior to 3.27.0, the per-template filter, tag, and function allow-list verdict is computed when a Template instance is constructed and can remain cached after sandbox state changes between renders, allowing a later sandboxed render to reuse a template that was originally checked with a different or empty policy. This issue is fixed in version 3.27.0.

CVSS v4.0

Score 6.0medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Affected software

Packagistmore threats →ai
twig/twig
pkg:composer/twig/twig
Affected versions
<3.27.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 22:28:23 UTC

Technical Analysis

CVE-2026-49981 describes a protection mechanism failure in twigphp Twig where the allow-list verdict for filters, tags, and functions is computed and cached at template construction time. Because this verdict can remain cached after changes to the sandbox policy between renders, a sandboxed render might reuse a template originally checked under a different or empty policy. This flaw affects Twig versions prior to 3.27.0 and was addressed by updating to version 3.27.0.

Potential Impact

The vulnerability could allow sandboxed template renders to bypass intended sandbox restrictions by reusing templates validated under different or empty policies. This undermines the sandbox's protection mechanism, potentially leading to unauthorized template behavior within sandboxed environments. No known exploits in the wild have been reported.

Mitigation Recommendations

Upgrade Twig to version 3.27.0 or later, where this issue is fixed. No other mitigations are specified. Patch status is not explicitly stated in the vendor advisory, but the fix is included in version 3.27.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-02T18:30:51.282Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a56aea568715ace4342b6f0

Added to database: 07/14/2026, 21:48:21 UTC

Last enriched: 07/22/2026, 22:28:23 UTC

Last updated: 08/16/2026, 00:41:14 UTC

Views: 88

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses