Skip to content
Heist/ feed
Back to feed
Medium

Contao is vulnerable to remote code execution in template closures

Type: advisorySources: OSV

Contao is an Open Source CMS. From version 4.0.0 to before 4.13.57, before 5.3.42, and before 5.6.5, back end users with precise control over the contents of template closures can execute arbitrary PHP functions that do not have required parameters. This issue has been patched in versions 4.13.57, 5.3.42, and 5.6.5. A workaround for this issue involves manually patching the Contao\Template::once() method.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-65960
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 03:39 UTC · Revision 1

Source evidence

Contao is vulnerable to remote code execution in template closures

core-osv · Original source

Published 25 Nov 2025, 18:54 UTC

Contao is an Open Source CMS. From version 4.0.0 to before 4.13.57, before 5.3.42, and before 5.6.5, back end users with precise control over the contents of template closures can execute arbitrary PHP functions that do not have required parameters. This issue has been patched in versions 4.13.57, 5.3.42, and 5.6.5. A workaround for this issue involves manually patching the Contao\Template::once() method.

osv:CVE-2025-65960
Complete source record
{
  "id": "9944ea03e50e6e8da70474044fd66d10c9a4f594b1e952697a77885f5c4bb6a8",
  "url": "https://osv.dev/vulnerability/CVE-2025-65960",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Contao is vulnerable to remote code execution in template closures",
    "summary": "Contao is an Open Source CMS. From version 4.0.0 to before 4.13.57, before 5.3.42, and before 5.6.5, back end users with precise control over the contents of template closures can execute arbitrary PHP functions that do not have required parameters. This issue has been patched in versions 4.13.57, 5.3.42, and 5.6.5. A workaround for this issue involves manually patching the Contao\\Template::once() method.",
    "evidence": "osv:CVE-2025-65960",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-65960",
      "aliases": [
        "CVE-2025-65960",
        "GHSA-98vj-mm79-v77r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/contao/contao",
              "type": "GIT",
              "events": [
                {
                  "introduced": "84b2fe637d5ead531f117f26b48d1b9de8df4074"
                },
                {
                  "fixed": "4dc65d395b4c62e0b1f6dbd86f4b5948610f64a5"
                },
                {
                  "introduced": "8cb541c59cb07ecb62fc5c5685c6448f38b97ad8"
                },
                {
                  "fixed": "85d5af6d350d9a72822fc3793c7ab692bb8191e6"
                },
                {
                  "introduced": "3173ec39227e5454439be24f7169bad5e0eb69f8"
                },
                {
                  "fixed": "760f3a8e29ff7b26d3f8c06617eb51dd5559ceac"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:contao:contao:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.13.57"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:contao:contao:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.0.0"
                      },
                      {
                        "fixed": "5.3.42"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:contao:contao:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.4.0"
                      },
                      {
                        "fixed": "5.6.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-65960.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.763784612Z",
      "provider": "osv",
      "references": [
        "https://contao.org/en/security-advisories/remote-code-execution-in-template-closures",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65960.json",
        "https://github.com/contao/contao/security/advisories/GHSA-98vj-mm79-v77r",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-65960"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-351"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65960.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-65960",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500073,
  "published_at": "2025-11-25T18:54:48.897+00:00"
}