/

CVE-2026-124434

Severity:

HIGH RISK

(7.1)

Information Disclosure (CWE-200) in Grav Lightbox Plugin

CVE-2026-124434

Deferred

Vulnerability type

Category:

Information Disclosure

CWE:

CWE-200

Impact:

Exposure of sensitive server-side information

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Grav Lightbox Gallery can invoke media methods named in certain shortcode values without applying Grav core's allowed-action check. A page editor who can craft these values may expose server-readable YAML file contents in a publicly viewable page.

Affected context

The issue is described for Grav Lightbox Gallery 1.1.0 before 1.3.2 on Grav 2.x. It occurs when the plugin processes image, thumb, or thumb_options shortcode values and calls a named media method without the core allowed-action check. Risk depends on whether an editor can create or modify such shortcodes and whether resulting pages are publicly accessible.

Exploit preconditions

  • Attack surface: Lightbox Gallery shortcodes processed by a Grav site
  • Required access: Ability to edit a page or otherwise control the relevant shortcode values
  • Trigger point: Rendering a page containing the crafted shortcode
  • Why exploitation is possible: The plugin calls named media methods without applying the core allowed-action check, enabling a method chain to place readable file contents into page output

Why this happens

The plugin performs dynamic method dispatch based on shortcode values without enforcing the same allowed-action restrictions as Grav core. This can let an editor chain media methods to access and serialize server-readable YAML content into a page. The resulting exposure of information to parties who should not have access maps to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.

Potential impact

  • Account password hashes, 2FA secrets, or API keys may be exposed if stored in readable YAML files.
  • Sensitive configuration data could be published to visitors of an affected page.
  • Exposed credentials or secrets could enable further unauthorized access, depending on their scope and validity.

General mitigation guidance

Defensive patterns focus on limiting which operations shortcode input can invoke and reducing the sensitivity of data available to the application.

  • Use explicit allowlists for methods callable through shortcode values; avoid unrestricted dynamic dispatch.
  • Validate shortcode inputs against a strict schema and reject unsupported values before processing.
  • Keep secrets out of files that the web application can read where practical, and use dedicated secret-management controls.
  • Restrict editor privileges and separate content-authoring permissions from access to sensitive configuration.
  • Apply least privilege to the application process and avoid exposing sensitive data in rendered output.

How teams detect issues like this

  • Review code for dynamic method calls derived from shortcode or other user-controlled values.
  • Check whether plugin paths enforce the same action allowlists and authorization checks as core components.
  • Search for method chains that can read, serialize, or render local files into page content.
  • Test shortcode handling with policy checks that verify unsupported methods and sensitive file access are rejected.
  • Use static analysis and automated code review checks to flag user-controlled method dispatch and file-to-response data flows.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-jq4h-4q3q-hr32
vulncheck.comvulncheck.com/advisories/grav-lightbox-gallery-1.1.0-before-1.3.2-file-read-via-shortcode-media-actions

Frequently asked

questions

The described attack requires the ability to create or modify a relevant page shortcode. The resulting information may be visible to anyone who can view the rendered page.

Not necessarily. Page-editing access may be sufficient if the site processes the shortcode and the application can read the targeted YAML files.

Restrict shortcode-driven method calls to a narrow, explicit allowlist and validate inputs before invoking any operation.

Limit editor permissions, keep secrets out of application-readable content files where possible, and review dynamic dispatch and file-to-page data flows.

Find out what's already
exploitable in your codebase.