Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-85604— Grav before 2.0.19 Remote Code Execution via sort filter

Quick assessment

Affected
getgrav grav
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Grav 2.0.19 之前的版本(受影响版本 ≤ 2.0.17)在 Twig 的 过滤器中存在远程代码执行漏洞。 中的 封装函数将 Twig 的 参数硬编码为 ,因此与 、 、 不同, 在沙箱模式下仍允许传入普通函数名。此外,剩余的黑名单(denylist)遗漏了 函数,而该函数会触发 PHP 的 操作。一个仅拥有页面写入权限( 或 )的已认证用户,可以通过精心构造的载荷(例如通过 Email 插件渲染的表单 frontmatter)调用 ,从而以 Web 服务器用户身份执行任意 PHP 代码。

CVSS 8.8 · High

Affected Version Matrix 2

VendorProduct Version RangeStatus
getgrav grav < 2.0.19 affected
2.0.19 unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-85604

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Grav before 2.0.19 Remote Code Execution via sort filter
Source: CVE Program / CVE List V5
Vulnerability Description
Grav before 2.0.19 (affected versions <= 2.0.17) contains a remote code execution vulnerability in the Twig sort filter. The sortFunc wrapper in GravExtension.php hardcodes Twig's isSandboxed argument to false, so unlike |map/|filter/|reduce, |sort accepts a plain function name inside the sandbox; the remaining denylist misses spl_autoload, which performs a PHP include. An authenticated user with only page-write rights (admin.pages or api.pages.write) can supply a crafted payload (e.g., via form frontmatter rendered by the Email plugin) that invokes spl_autoload through the sort filter, resulting in arbitrary PHP execution as the web server user.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
对生成代码的控制不恰当(代码注入)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
getgrav grav 0 ~ 2.0.19 -

II. Public POCs for CVE-2026-85604

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-85604

登录查看更多情报信息。

Vendor Advisories for CVE-2026-85604 (2)

Same Patch Batch · getgrav · 2026-09-04 · 7 CVEs total

CVE-2026-85599 7.2 HIGH Grav Shortcode Core before 6.2.5 Stored XSS via unescaped parameters
CVE-2026-85603 6.5 MEDIUM Grav Admin Plugin Path Traversal via Save As Language Code
CVE-2026-85598 6.4 MEDIUM Grav 2.0.0 through 2.0.17 Stored XSS via Modular Pages
CVE-2026-85600 5.4 MEDIUM Grav Admin before 2.0.21 Stored XSS via username
CVE-2026-85601 5.4 MEDIUM Grav Admin before 2.0.20 Cross-Site Scripting via marked.js
CVE-2026-85602 5.3 MEDIUM Grav Form Plugin before 9.1.20 reCAPTCHA v3 Authentication Bypass

IV. Related Vulnerabilities

V. Comments for CVE-2026-85604

No comments yet


Leave a comment