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%

CWE-693: Protection Mechanism Failure in twigphp Twig (CVE-2026-48807)

0
High
Published: 07/14/2026 (07/14/2026, 21:29:15 UTC)
Source: GCVE Database
Vendor/Project: twigphp
Product: Twig

Description

Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable values passed to join and replace filters or operands evaluated by the in and not in operators, allowing contained Stringable objects to be coerced to strings without consulting the sandbox policy. This issue is fixed in version 3.27.0.

CVSS v4.0

Score 7.1high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
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:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Affected software

Packagistghsa
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/15/2026, 07:56:04 UTC

Technical Analysis

The vulnerability in twig/twig versions prior to 3.27.0 involves a sandbox bypass related to the __toString() method. Specifically, when sandboxed templates use the join and replace filters with Traversable inputs or the in and not in operators, the sandbox policy does not recursively verify Stringable objects inside Traversable containers or operands coerced to strings. This allows sandboxed template authors to invoke __toString() on objects that should be restricted, bypassing the intended sandbox policy enforcement. The issue is categorized under CWE-693 (Protection Mechanism Failure) and CWE-863 (Incorrect Authorization).

Potential Impact

Sandboxed template authors can bypass sandbox restrictions to invoke the __toString() method on objects that should be protected. This could lead to unauthorized code execution paths or information disclosure within the context of template rendering. The vulnerability is rated medium severity and no known exploits in the wild have been reported.

Mitigation Recommendations

A fix is available in twig/twig version 3.27.0 and later. Users should upgrade to version 3.27.0 or newer to remediate this vulnerability. Patch status is confirmed by the version boundary provided. No vendor advisory content was provided, so check the official twig/twig release notes or security advisories for confirmation and additional guidance.

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

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-8x9c-rmqh-456c
Osv Schema Version
1.4.0
Aliases
["CVE-2026-48807"]
Ecosystems
["Packagist"]
Database Specific Severity
MODERATE
Cvss Version
null

Threat ID: 6a4452e027e9c797198e1086

Added to database: 06/30/2026, 23:36:00 UTC

Last enriched: 07/15/2026, 07:56:04 UTC

Last updated: 07/31/2026, 19:24:50 UTC

Views: 76

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