Skip to content

Commit 07751dc

Browse files
committed
[security] block page-content extensions in uploads (GHSA-w4rc-p66m-x6qq)
Adds md, yaml, yml, json, twig, ini to the default security.uploads_dangerous_extensions so any code path calling Utils::checkFilename() rejects them by default. Pairs with the Form 9.1.0 plugin fix as defense-in-depth — this protects sites running older Form releases that haven't yet been upgraded.
1 parent 84a303a commit 07751dc

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v2.0.0-beta.4
2+
## 04/29/2026
3+
4+
1. [](#bugfix)
5+
* [security] Extended default `uploads_dangerous_extensions` to include `md`, `yaml`, `yml`, `json`, `twig`, `ini` — page-content extensions that can be weaponised via permissive form-upload `accept` policies (GHSA-w4rc-p66m-x6qq, defense-in-depth alongside the Form 9.1.0 plugin fix).
6+
17
# v2.0.0-beta.3
28
## 04/28/2026
39

system/config/security.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ uploads_dangerous_extensions:
5656
- shtm
5757
- js
5858
- exe
59+
# GHSA-w4rc-p66m-x6qq: writing these into a page directory (e.g. via a
60+
# form upload with destination: self@) turns an upload into arbitrary
61+
# page-content takeover. Block by default alongside the Form 9.1.0 fix.
62+
- md
63+
- yaml
64+
- yml
65+
- json
66+
- twig
67+
- ini
5968
sanitize_svg: true
6069
# Twig sandbox for editor-authored page content. Applies to Twig::processPage()
6170
# and Twig::processString() — theme templates on disk are unaffected. When

system/defines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Some standard defines
1111
define('GRAV', true);
12-
define('GRAV_VERSION', '2.0.0-beta.3');
12+
define('GRAV_VERSION', '2.0.0-beta.4');
1313
define('GRAV_SCHEMA', '1.8.0_2026-04-15_0');
1414
define('GRAV_TESTING', true);
1515

0 commit comments

Comments
 (0)