llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · getgrav/grav

GHSA-VWG3-W8W3-PC79

Grav: .htaccess file extension rules bypass via case variation on case-insensitive filesystems

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión2.0.4
Exposición93 dDesde la divulgación, 19 ago 2026, 2:32 p. m.
Detección89 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (alta) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Nivel de sospecha: ceja levantada.Hoy es tranquila, pero podría madrugarte.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada
19 ago 26
10 sept 26
17 nov 26
21 nov 26
19 ago 26
12 sept 26
5 oct 26
29 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-VWG3-W8W3-PC79 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The default `.htaccess` shipped with Grav (and the reference `webserver-configs/htaccess.txt`) contains security rules that block direct HTTP access to sensitive file types (`.yaml`, `.yml`, `.php`, `.json`, `.twig`, etc.) under `user/` and `system/vendor/` directories. However, these rules lack the `[NC]` (No Case) flag, making them case-sensitive. On case-insensitive filesystems (Windows/NTFS, macOS/HFS+, or Linux with Docker volumes mounted from Windows/macOS), an attacker can bypass these rules by requesting files with uppercase extensions (e.g., `.YAML`, `.PHP`, `.JSON`).

Affected Versions

  • Grav 2.0.1 (latest stable as of June 2026) — confirmed
  • Grav 1.7.x — likely affected (same `.htaccess` rules)
  • All versions shipping the current `webserver-configs/htaccess.txt`

Affected Component

File: `.htaccess` (root of Grav installation)
Reference: `webserver-configs/htaccess.txt`

Affected Rules (lines 68, 70, 72)

# Line 68 — system/vendor file types
RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|htm|shtml|shtm|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ error [F]

# Line 70 — user file types
RewriteRule ^(user)/(.*)\.(txt|md|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ error [F]

# Line 72 — .md files globally
RewriteRule \.md$ error [F]

All three rules use `[F]` without `[NC]`, making the extension match case-sensitive.

Steps to Reproduce

  1. Install Grav on a system with a case-insensitive filesystem:
  2. Windows (native WAMP/XAMPP)
  3. macOS (default HFS+)
  4. Docker on Windows/macOS with volume mounts (e.g., `./data:/var/www/html`)
  1. Create or use any plugin that stores sensitive data in its YAML config (e.g., API keys):
  1. Request the file with a case-varied extension:
  1. Expected: HTTP 403 Forbidden
  2. Actual: HTTP 200 OK — full file contents returned, including any API keys or sensitive configuration

Impact

  • Information disclosure: Plugin configuration files (`.yaml`) containing API keys, credentials, or sensitive settings can be read by unauthenticated users
  • Source code exposure: PHP source files can be downloaded (instead of executed) when requested with `.PHP` extension on some configurations
  • Configuration exposure: `user/config/system.yaml`, `user/config/site.yaml`, and other system configuration files are accessible

Fix

Add the `[NC]` flag to the three affected rules:

RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|htm|shtml|shtm|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ error [F,NC]
RewriteRule ^(user)/(.*)\.(txt|md|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ error [F,NC]
RewriteRule \.md$ error [F,NC]

The `[NC]` flag makes the extension matching case-insensitive, covering `.YAML`, `.Yaml`, `.PHP`, `.Json`, etc.

Mitigating Factors

  • On native Linux with ext4 filesystem (case-sensitive), the attack does not work because Apache cannot resolve the uppercase filename to the actual file
  • Grav 2.0's Twig sandbox blocks access to `plugins` config subtree from page content, preventing SSTI-based config exfiltration
  • The `user/accounts/`, `user/config/`, and `user/data/` folders have separate rules (line 62, 66) that block ALL file types regardless of extension — these are not affected

Environment

  • Grav: 2.0.1
  • PHP: 8.3
  • Apache: 2.4 with mod_rewrite
  • OS: Docker (php:8.3-apache) with volume mounted from Windows 10 (NTFS)
  • Tested: June 2026

Reporter

Sisnetic

Versiones

Rangos afectados

Afectada Corregida
getgrav/grav< 2.0.4
2.0.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistgetgrav/grav
Corregida 2.0.4 — —
Versiones corregidas2.0.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-62673
Otrahttps://github.com/getgrav/grav/security/advisories/GHSA-vwg3-w8w3-pc79
Otrahttps://github.com/getgrav/grav/commit/8c9d1e7b6fd66ecea80a4bc3783fd41d36e22fb1
Otrahttps://github.com/getgrav/grav
Otrahttps://github.com/getgrav/grav/releases/tag/2.0.4

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.