CVE-2025-65960: Contao/core bundle Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-98vj-mm79-v77r
CVSS 6.6
CWE-351
Published
Advisory Summary

CVE-2025-65960 is a MODERATE (CVSS 6.6) remote code execution vulnerability (CWE-351: Insufficient Type Distinction) affecting Contao/core bundle libraries in the Packagist ecosystem. The issue involves contao is vulnerable to remote code execution in template closures. Remediation is available by upgrading affected packages to version 4.13.57, 5.3.42, 5.6.5.

CVE-2025-65960 at a Glance

CVE Identifier CVE-2025-65960
GHSA Identifier GHSA-98vj-mm79-v77r
Severity MODERATE
CVSS v3.1 Base Score 6.6
CWE Classification CWE-351: Insufficient Type Distinction
Affected Product Contao/core bundle
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-65960

To remediate this vulnerability, upgrade all affected Contao/core bundle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

contao/core-bundle fixed: 4.13.57
Upgrade contao/core-bundle to 4.13.57
contao/core-bundle fixed: 5.3.42
Upgrade contao/core-bundle to 5.3.42
contao/core-bundle fixed: 5.6.5
Upgrade contao/core-bundle to 5.6.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for contao/core-bundle

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-65960, inspect your project dependencies for Contao/core bundle:

inspect dependencies for contao/core-bundle

Analyze the terminal output to locate any version of Contao/core bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.13.57), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-351: Insufficient Type Distinction, where the product does not properly distinguish between different types of elements in a way that leads to insecure behavior. In Contao/core bundle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Backend users with precise control over the contents of template closures can execute arbitrary PHP functions that do not have required parameters. ### Patches Update to Contao 4.13.57, 5.3.42 or 5.6.5 ### Workarounds Manually patch the `Contao\Template::once()` method. ### Resources https://contao.org/en/security-advisories/remote-code-execution-in-template-closures

CVE-2025-65960 Affected Contao/core bundle Versions

3 component(s)
Fixed Versions:
4.13.575.3.425.6.5
Product / Package Ecosystem Affected Versions Fixed Version
contao/core-bundle
Packagist
≥ 4.0.0
< 4.13.57
4.13.57
contao/core-bundle
Packagist
≥ 5.0.0-RC1
< 5.3.42
5.3.42
contao/core-bundle
Packagist
≥ 5.4.0-RC1
< 5.6.5
5.6.5

References

Frequently Asked Questions

What is CVE-2025-65960?
CVE-2025-65960 is a security vulnerability in Contao/core bundle involving Contao is vulnerable to remote code execution in template closures under CWE-351: Insufficient Type Distinction.
Which Contao/core bundle versions are affected?
Affected versions include releases prior to 4.13.57, 5.3.42, 5.6.5 across affected packages: contao/core-bundle.
What version fixes CVE-2025-65960?
Upgrading to 4.13.57, 5.3.42, 5.6.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is contao/core-bundle affected?
Yes, contao/core-bundle is affected in releases prior to 4.13.57, 5.3.42, 5.6.5. Upgrade your dependency to 4.13.57, 5.3.42, 5.6.5 or later.
What is the CVSS score of CVE-2025-65960?
CVE-2025-65960 has a CVSS v3.1 base score of 6.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-65960?
CVE-2025-65960 is classified under CWE-351: Insufficient Type Distinction (The product does not properly distinguish between different types of elements in a way that leads to insecure behavior.).
How can I check Packagist dependencies for CVE-2025-65960?
Run the dependency tree command: 'inspect dependencies for contao/core-bundle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-98vj-mm79-v77r",
  "modified" : "2025-11-27T08:59:22Z",
  "published" : "2025-11-25T20:43:13Z",
  "aliases" : [ "CVE-2025-65960" ],
  "summary" : "Contao is vulnerable to remote code execution in template closures",
  "details" : "### Impact\n\nBackend users with precise control over the contents of template closures can execute arbitrary PHP functions that do not have required parameters.\n\n### Patches\n\nUpdate to Contao 4.13.57, 5.3.42 or 5.6.5\n\n### Workarounds\n\nManually patch the `Contao\\Template::once()` method.\n\n### Resources\n\nhttps://contao.org/en/security-advisories/remote-code-execution-in-template-closures",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "contao/core-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.13.57"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "contao/core-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.3.42"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "contao/core-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.4.0-RC1"
      }, {
        "fixed" : "5.6.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/contao/contao/security/advisories/GHSA-98vj-mm79-v77r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-65960"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/contao/contao/commit/577d7fdd5b1ca84f65f034ff556865422f0a3bd1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/contao/contao/commit/676f0855d39007ac9a0dbe7ae6a7414cba2312a5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/contao/contao/commit/ebf84c90e5679a67060f396b924ce4a3c3f206b3"
  }, {
    "type" : "WEB",
    "url" : "https://contao.org/en/security-advisories/remote-code-execution-in-template-closures"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/contao/contao"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-351" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-25T20:43:13Z",
    "nvd_published_at" : "2025-11-25T19:15:51Z"
  }
}