{
  "id": "CVE-2026-46633",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-46633",
  "published_at": "2026-07-14T21:14:24.916Z",
  "title": "Twig: PHP code injection via `{% use %}` template name",
  "vendor": "twigphp",
  "product": "Twig",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "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. Starting in 1.15.1 and prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.",
  "cwe": "CWE-94",
  "cpes": [
    "cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.7,
    "nvd": 9.8
  },
  "repos": [
    {
      "repo": "vladko312/extras",
      "url": "https://github.com/vladko312/extras",
      "created_at": "2024-10-14T17:47:19Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 18,
      "is_poc": "fake",
      "kind": "fake",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-03-15T15:04:46Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "twigphp",
        "product": "Twig",
        "ranges": [
          "\u003e= 1.15.1, \u003c 3.26.0"
        ],
        "fixed_in": [
          "3.26.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Twig to 3.26.0 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/twigphp/Twig/commit/a2c6db7ea7d2c90923e6708019ec1442526d1c30"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/twigphp/Twig/releases/tag/v3.26.0"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
