{
  "id": "CVE-2026-48806",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-48806",
  "published_at": "2026-07-14T21:28:08.781Z",
  "title": "Twig: Sandbox `__toString()` policy bypass via dynamic mapping keys",
  "vendor": "twigphp",
  "product": "Twig",
  "cvss": {
    "score": 9.1,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Twig is a template language for PHP. Prior to 3.27.0, ArrayExpression does not guard dynamic mapping keys that are coerced to strings, allowing PHP to invoke __toString() on a Stringable object used as a mapping key without calling SandboxExtension::ensureToStringAllowed(). This issue is fixed in version 3.27.0.",
  "cwe": "CWE-693",
  "cpes": [
    "cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.1,
    "nvd": 9.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "twigphp",
        "product": "Twig",
        "ranges": [
          "\u003c 3.27.0"
        ],
        "fixed_in": [
          "3.27.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Twig to 3.27.0 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-5v5v-ww74-355v"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/twigphp/Twig/commit/9ff41014639ef0e8eb50ac7669191c309d863105"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/twigphp/Twig/releases/tag/v3.27.0"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
