UBUNTU-CVE-2026-48807
Twig, a PHP template language, has a vulnerability in versions prior to 3.27.0 where sandbox __toString() checks do not fully cover Traversable values passed to certain filters and operators. This allows Stringable objects contained within these values to be coerced to strings without sandbox policy enforcement. The issue is fixed in version 3.27.0.
AI Analysis
Technical Summary
The vulnerability in Twig prior to version 3.27.0 involves incomplete sandbox __toString() checks for Traversable values used in join and replace filters or operands evaluated by the in and not in operators. This flaw permits contained Stringable objects to be converted to strings without consulting the sandbox policy, potentially bypassing intended sandbox restrictions. The fix was implemented in Twig version 3.27.0.
Potential Impact
This vulnerability allows sandbox policy bypass by coercing Stringable objects to strings without proper sandbox checks. This could lead to unintended code execution or information disclosure within sandboxed Twig templates. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade Twig to version 3.27.0 or later where this vulnerability is fixed. The affected Ubuntu package versions listed should be updated accordingly to receive the patched version. No other mitigations are indicated.
UBUNTU-CVE-2026-48807
Description
Twig, a PHP template language, has a vulnerability in versions prior to 3.27.0 where sandbox __toString() checks do not fully cover Traversable values passed to certain filters and operators. This allows Stringable objects contained within these values to be coerced to strings without sandbox policy enforcement. The issue is fixed in version 3.27.0.
CVSS v4.0
Affected software
pkg:deb/ubuntu/[email protected]~esm2?arch=source&distro=esm-apps/focalpkg:deb/ubuntu/[email protected]+esm2?arch=source&distro=esm-apps/jammypkg:deb/ubuntu/[email protected]+esm1?arch=source&distro=esm-apps/noblepkg:deb/ubuntu/[email protected]?arch=source&distro=questingpkg:deb/ubuntu/[email protected]~esm1?arch=source&distro=esm-apps/resoluteRun 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
Technical Analysis
The vulnerability in Twig prior to version 3.27.0 involves incomplete sandbox __toString() checks for Traversable values used in join and replace filters or operands evaluated by the in and not in operators. This flaw permits contained Stringable objects to be converted to strings without consulting the sandbox policy, potentially bypassing intended sandbox restrictions. The fix was implemented in Twig version 3.27.0.
Potential Impact
This vulnerability allows sandbox policy bypass by coercing Stringable objects to strings without proper sandbox checks. This could lead to unintended code execution or information disclosure within sandboxed Twig templates. No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade Twig to version 3.27.0 or later where this vulnerability is fixed. The affected Ubuntu package versions listed should be updated accordingly to receive the patched version. No other mitigations are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-48807
- Osv Schema Version
- 1.7.0
- Aliases
- []
- Ecosystems
- ["Ubuntu:Pro:20.04:LTS","Ubuntu:Pro:22.04:LTS","Ubuntu:Pro:24.04:LTS","Ubuntu:25.10","Ubuntu:Pro:26.04:LTS"]
- Database Specific Severity
- null
- Cvss Version
- 4.0
Threat ID: 6a58b49568715ace43da7e1a
Added to database: 07/16/2026, 10:38:13 UTC
Last enriched: 07/16/2026, 12:26:19 UTC
Last updated: 07/16/2026, 12:26:19 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.