Krytyczna

Grav has multiple RCE vectors: unsafe unserialize (x3), command injection in git clone, SSTI blocklist bypass

  • Ujawniono: 05.05.2026
  • Aktualizacja: 11.10.2026 10:22

Multiple RCE vectors were found in Grav CMS. Three are critical, two are high.

1. Unsafe unserialize() in JobQueue — direct RCE gadget (Critical)

system/src/Grav/Common/Scheduler/JobQueue.php:465 calls unserialize(base64_decode(...)) without restricting allowed_classes. The Job class has call_user_func_array($this->command, $this->args) in its execution path, which is a direct gadget chain — inject a serialized Job with command = 'system' and args = ['whoami'].

The same codebase actually has a Serializable trait that correctly restricts classes, so this inconsistency stands out.

2. Unsafe unserialize() in FileCache — arbitrary class instantiation (Critical)

system/src/Grav/Framework/Cache/Adapter/FileCache.php:75 does unserialize($value, ['allowed_classes' => true]). That true allows instantiation of any class. If an attacker can write to the cache directory (via any file write primitive), they get object injection → RCE.

3. Unsafe unserialize() in Session (High)

system/src/Grav/Common/Session.php:116 — same allowed_classes => true pattern on session data. Lower severity since session storage is typically more restricted.

4. Command injection in git clone (Critical)

system/src/Grav/Console/Cli/InstallCommand.php:150 — only $this->destination uses escapeshellarg(). The $data['branch'], $data['url'], and $data['path'] variables go directly into the shell command without escaping. Admin-accessible via plugin/theme installation.

5. SSTI blocklist bypass (High)

system/src/Grav/Common/Security.php:267-286 — cleanDangerousTwig() blocks twig_array_map and twig_array_filter but not twig_array_reduce. Also missing file_get_contents and fwrite from the dangerous function blocklist. An attacker who can inject Twig templates can bypass the security filter.

All five are independently exploitable. The unserialize issues are the most concerning since they don't require admin access if there's any file write primitive.

— ProScan AppSec | proscan.one


Maintainer note — fix applied (2026-04-24)

Fixed in Grav core on the 2.0 branch: commit c66dfeb5f (items #1, #2, #3, #4) and commit 38685ac25 + c66dfeb5f (item #5) — ships in 2.0.0-beta.2.

All five vectors addressed:

  1. Scheduler\JobQueue unsafe unserialize — serialized_job now carries a sibling serialized_job_hmac signed with Security::getNonceKey(). reconstructJob refuses to unserialize an item whose HMAC is missing/mismatched and falls through to the safe structured-fields rebuild. A tampered queue file can no longer smuggle a forged Job for direct RCE via Job::exec → call_user_func_array.
    → system/src/Grav/Common/Scheduler/JobQueue.php

  2. FileCache unsafe unserialize — same HMAC-integrity approach; see separate GHSA-gwfr-jfjf-92vv.
    → system/src/Grav/Framework/Cache/Adapter/FileCache.php

  3. Session::getFlashObject unsafe unserialize — payload now wrapped in a v2|<hmac>|<serialized> envelope; legacy/forged envelopes return null instead of triggering unserialize.
    → system/src/Grav/Common/Session.php

  4. InstallCommand git clone shell injection — branch, url, and path values read from user/.dependencies are now passed through escapeshellarg, with a -- separator before url/path to block option-injection (e.g. --upload-pack=evil).
    → system/src/Grav/Console/Cli/InstallCommand.php

  5. SSTI blocklist bypass — twig_array_reduce (the specific name called out) plus twig_array_some and twig_array_every added to cleanDangerousTwig's CALLABLE_DANGEROUS_NAMES alongside the existing twig_array_map/filter. More importantly, the new Twig content sandbox in 2.0.0-beta.2 blocks this class of attack at a different layer — see the sandbox work in 38685ac25.
    → system/src/Grav/Common/Security.php

Tests:

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka Composer getgrav/grav < 2.0.0-beta.2 2.0.0-beta.2

Odnośniki

Ocena CVSS -
Słabość (CWE)
CWE-502, CWE-78
Platforma
Composer
Paczka
getgrav/grav
Ujawniono
05.05.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-vj3m-2g9h-vm4p - CC BY 4.0

Historia podatności: getgrav/grav

Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (99) w archiwum
Wszystkich wpisów
99
Pierwsza → ostatnia
11.2019 09.2026
Bez poprawki
6
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 7
  • Wysoka 47
  • Średnia 41
  • Niska 4

Ujawnienia w latach

  1. 2019: 1
  2. 2020: 1
  3. 2021: 4
  4. 2022: 10
  5. 2023: 5
  6. 2024: 8
  7. 2025: 23
  8. 2026: 47
Istotność:
  1. Wysoka · 8.8 CVE-2026-72819 < 2.0.13 2.0.13
  2. Wysoka CVE-2026-53653 >= 2.0.0-beta.1, < 2.0.0-rc.8, < 1.7.53 2.0.0-rc.8, 1.7.53
  3. Wysoka · 8.9 CVE-2026-42611 < 2.0.0-beta.2 2.0.0-beta.2
  4. Grav has multiple RCE vectors: unsafe unserialize (x3), command injection in git clone, SSTI blocklist bypass ten wpis
    Krytyczna CVE-2026-56700 < 2.0.0-beta.2 2.0.0-beta.2
  5. Wysoka · 8.5 CVE-2026-42612 < 2.0.0-beta.2 2.0.0-beta.2
  6. Krytyczna · 9.4 CVE-2026-42613 < 2.0.0-beta.2 2.0.0-beta.2
  7. Krytyczna · 9.1 CVE-2025-66844 <= 1.7.49.5 brak poprawki
  8. Wysoka CVE-2025-66298 < 1.8.0-beta.27 1.8.0-beta.27
  9. Wysoka CVE-2025-66294 < 1.8.0-beta.27 1.8.0-beta.27
  10. Wysoka · 8.5 CVE-2025-66300 < 1.8.0-beta.27 1.8.0-beta.27
  11. Wysoka · 8.8 CVE-2025-66299 < 1.8.0-beta.27 1.8.0-beta.27
  12. Wysoka · 8.5 CVE-2024-34082 < 1.7.46 1.7.46
  13. Wysoka · 8.8 CVE-2024-28119 < 1.7.45 1.7.45
  14. Wysoka · 8.8 CVE-2024-28118 < 1.7.45 1.7.45
  15. Wysoka · 8.8 CVE-2024-28117 < 1.7.45 1.7.45
  16. Wysoka · 8.8 CVE-2024-27921 < 1.7.45 1.7.45
  17. Wysoka · 8.8 CVE-2024-27923 < 1.7.43 1.7.43
  18. Wysoka · 7.2 CVE-2023-37897 < 1.7.42.2 1.7.42.2
  19. Wysoka · 7.2 CVE-2023-34448 < 1.7.42 1.7.42
  20. Wysoka · 7.2 CVE-2023-34252 < 1.7.42 1.7.42
  21. Krytyczna · 9.1 CVE-2023-34251 < 1.7.42 1.7.42
  22. Wysoka · 7.2 CVE-2022-2073 < 1.7.34 1.7.34
  23. Wysoka · 8.1 CVE-2020-29555 >= 1.7.0-beta.1, <= 1.7.0-rc.17, < 1.6.30 1.6.30
  24. Wysoka · 8.8 CVE-2020-29553 >= 1.7.0-beta.1, <= 1.7.0-rc.17, < 1.6.30 1.6.30
  25. Wysoka · 7.1 CVE-2022-0970 < 1.7.31 1.7.31
  26. Wysoka · 8.8 CVE-2021-3924 <= 1.7.24 brak poprawki
  27. Wysoka · 8.4 CVE-2021-29440 < 1.7.11 1.7.11

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.