Executive brief
Grav CMS, a popular open-source content management system, allows editors to add watermarks to images using a markdown syntax. A path traversal vulnerability in the watermark feature allows an editor to read arbitrary image files from the server's filesystem outside the intended media directories. Once a page containing such a malicious watermark reference is viewed by any visitor, the exposed image is cached and accessible publicly without authentication, potentially disclosing sensitive files to all site visitors.
Technical details
The vulnerability is a path traversal flaw in ImageMedium::watermark() that passes unsanitized image parameters to UniformResourceLocator::findResource(). The resolver performs only lexical string-based path normalization (collapsing ../ segments) without real-path validation or containment checking. For file:// scheme paths, the resolved absolute path is returned directly without verification that it remains within registered stream roots. An attacker with editor-level privileges (page edit permission, no admin panel access required) can craft a markdown image reference using relative path traversal (e.g., ?watermark=../../../secret.png) to load and composite arbitrary image files from the filesystem. The resulting composited image is cached and served from a public unauthenticated URL, exposing the file content to all site visitors. The vulnerability exists in Grav 2.0.11 and affects the dependency rockettheme/toolbox v2.x-dev.
Affected products
- Grav Grav CMS 2.0.11 and prior (develop/2.0 line)
Timeline
- 2026-09-17: disclosed
- other: CVE-2026-69089 assigned