Categories
CVE-2026-72779 medium CVSS 4.5

Vulnerability in craftcms/cms (CVE-2026-72779)

Summary

Vulnerability in craftcms/cms (CVE-2026-72779). Confidential information can be exposed externally. Exploitable via SplFileObject. Mitigation: upgrade to 4.18.2 or later.

Original description

The description as published by the source.

The create() Twig function (introduced in 5.9.0) allows instantiation of arbitrary PHP classes from template code, restricted only by a 5-entry blocklist. SplFileObject is not in the blocklist, enabling arbitrary file read, including .env (security key, DB credentials) and the passwd file from non-sandboxed Twig template contexts, such as entry type title formats and URI formats.

The sandbox correctly blocks create() in system email templates, so this finding applies only to admin-configured, non-sandboxed contexts that require allowAdminChanges=true.

Prerequisites

  • Admin access to the Craft control panel
  • allowAdminChanges must be true (default in dev/staging, recommended false in production)
  • Admin must be able to edit entry type settings (title format, URI format)
  • Any user who subsequently creates an entry in the affected section triggers the file read

Limitations

  • Requires admin-level access: not exploitable by low-privilege users
  • allowAdminChanges must be true: production best practices recommend false, which prevents entry type configuration changes
  • Per Craft’s own severity guidelines, findings requiring allowAdminChanges=true are rated low
  • The create() function is blocked by the Twig sandbox, so this cannot be exploited via system email templates or any other sandboxed context

Impact

An admin user (or an attacker who has compromised an admin account) can read arbitrary files from the server filesystem by setting a…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-72779 has been found in craftcms/cms.
Attackers can target a specific entry point like SplFileObject over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 4.5/10.
What to do: upgrade craftcms/cms to 4.18.2 or later.
If unsure, ask your IT team or search "craftcms/cms CVE-2026-72779" on the vendor's site.

CVE-2026-72779 (craftcms/cms) — CWE-184 / CVSS v3 4.5
Attack vector: remote (network-reachable)
Attack surface: SplFileObject / allowAdminChanges / true / false
Patched: 4.18.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-184) exists in craftcms/cms. Attackers reach the vulnerable code path via SplFileObject.

📍 Affected scope

Check the vendor advisory for the affected versions of craftcms/cms. Attack surface: SplFileObject / allowAdminChanges / true / false.

🔥 Severity

Severity: Medium (CVSS 4.5/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 4.18.2.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'craftcms/cms' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'craftcms/cms' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で craftcms/cms を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade craftcms/cms to 4.18.2

    ステージング環境で 4.18.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

composer craftcms/cms
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.18.2"}]}]
Packagist craftcms/cms
[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0-RC1"},{"fixed":"4.18.2"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details