CVEMETERBack to radar
OFFICIAL RECORD · PHP packages

CVE-2026-24425

PUBLISHEDOfficial status check: verifiedCVSS 4.0: 8.7 · high

Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.

Severity and exploitation evidence

EPSS: 0.758% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.

CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:28:52.703Z. Public exploit availability is not used to set this status.

CVSS 4.0 · 8.7 · published by VulnCheck
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T12:01:45.523Z

CVSS 3.1 · 8.8 · published by VulnCheck
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Assessment source · checked 2026-11-19T12:01:45.523Z

Verification by field

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T17:28:52.703ZCISA KEV
cvssverified2026-11-19T12:01:45.523ZCVE Program
epssverified2026-11-19T16:04:47.776ZFIRST EPSS
patchesverified2026-11-19T12:52:00.377ZOSV
affectedverified2026-11-19T12:01:45.523ZCVE Program
lifecycleverified2026-11-19T12:01:45.523ZCVE Program

Affected versions and configuration

twigphp Twig; default status: affected: 3.9.0 to < 3.26.0 [affected; scheme: semver]; 2.16.0 [affected; scheme: custom]

Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.

OSV · osv · full conditions
{
  "id": "GHSA-2q52-x2ff-qgfr",
  "aliases": [
    "CVE-2026-24425"
  ],
  "affected": [
    {
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "2.16.0"
            },
            {
              "last_affected": "2.16.1"
            }
          ]
        }
      ],
      "package": {
        "name": "twig/twig",
        "purl": "pkg:composer/twig/twig",
        "ecosystem": "Packagist"
      },
      "versions": [
        "v2.16.0",
        "v2.16.1"
      ],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-2q52-x2ff-qgfr/GHSA-2q52-x2ff-qgfr.json"
      }
    },
    {
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "3.9.0"
            },
            {
              "fixed": "3.26.0"
            }
          ]
        }
      ],
      "package": {
        "name": "twig/twig",
        "purl": "pkg:composer/twig/twig",
        "ecosystem": "Packagist"
      },
      "versions": [
        "v3.10.0",
        "v3.10.1",
        "v3.10.2",
        "v3.10.3",
        "v3.11.0",
        "v3.11.1",
        "v3.11.2",
        "v3.11.3",
        "v3.12.0",
        "v3.13.0",
        "v3.14.0",
        "v3.14.1",
        "v3.14.2",
        "v3.15.0",
        "v3.16.0",
        "v3.17.0",
        "v3.17.1",
        "v3.18.0",
        "v3.19.0",
        "v3.20.0",
        "v3.21.0",
        "v3.21.1",
        "v3.22.0",
        "v3.22.1",
        "v3.22.2",
        "v3.23.0",
        "v3.24.0",
        "v3.25.0",
        "v3.9.0",
        "v3.9.1",
        "v3.9.2",
        "v3.9.3"
      ],
      "database_specific": {
        "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-2q52-x2ff-qgfr/GHSA-2q52-x2ff-qgfr.json"
      }
    }
  ],
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    },
    {
      "type": "CVSS_V4",
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
    }
  ],
  "upstream": [],
  "withdrawn": null,
  "references": [
    {
      "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr",
      "type": "WEB"
    },
    {
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-24425",
      "type": "ADVISORY"
    },
    {
      "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-24425.yaml",
      "type": "WEB"
    },
    {
      "url": "https://github.com/twigphp/Twig",
      "type": "PACKAGE"
    },
    {
      "url": "https://github.com/twigphp/Twig/releases/tag/v3.26.0",
      "type": "WEB"
    },
    {
      "url": "https://symfony.com/cve-2026-24425",
      "type": "WEB"
    },
    {
      "url": "https://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface",
      "type": "WEB"
    }
  ],
  "relatedGitRanges": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-693"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "nvd_published_at": "2026-05-20T14:16:38Z",
    "github_reviewed_at": "2026-06-05T20:41:33Z"
  }
}
Archived source JSON
CVE Program · cve-json · full conditions
{
  "affected": [
    {
      "repo": "https://github.com/twigphp/Twig",
      "vendor": "twigphp",
      "product": "Twig",
      "versions": [
        {
          "status": "affected",
          "version": "3.9.0",
          "lessThan": "3.26.0",
          "versionType": "semver"
        },
        {
          "status": "affected",
          "version": "2.16.0",
          "versionType": "custom"
        }
      ],
      "packageURL": "pkg:composer/twig/twig",
      "defaultStatus": "affected"
    }
  ],
  "additionalContainers": [
    {
      "title": "CISA ADP Vulnrichment",
      "metrics": [
        {
          "other": {
            "type": "ssvc",
            "content": {
              "id": "CVE-2026-24425",
              "role": "CISA Coordinator",
              "options": [
                {
                  "Exploitation": "none"
                },
                {
                  "Automatable": "no"
                },
                {
                  "Technical Impact": "total"
                }
              ],
              "version": "2.0.3",
              "timestamp": "2026-05-20T15:43:54.656189Z"
            }
          }
        }
      ],
      "providerMetadata": {
        "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "shortName": "CISA-ADP",
        "dateUpdated": "2026-05-20T15:44:33.359Z"
      }
    }
  ]
}
Archived source JSON

Correction evidence

Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.

Evidence typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundaryPackagist / packagetwig/twigNot a distribution channel3.26.0Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history