Directory Traversal in mojoPortal BetterImageGallery ImageHandler
CVE-2025-28367 is a directory traversal vulnerability in mojoPortal versions 2.9.0.1 and earlier. The issue affects the BetterImageGallery API Controller, specifically the ImageHandler action. By supplying crafted path input, an attacker can traverse outside the intended directory scope and read arbitrary files accessible to the web application. The provided context specifically states that the vulnerability can be used to access the application's Web.Config file and obtain the ASP.NET MachineKey.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows unauthorized file read via directory traversal. In the described scenario, an attacker can retrieve the Web.Config file and extract the ASP.NET MachineKey. Exposure of the MachineKey can enable further compromise depending on application configuration, including forging or tampering with protected ASP.NET data such as forms authentication tickets, view state, or other cryptographically protected values. At minimum, this results in disclosure of sensitive configuration data and may facilitate follow-on attacks against the application.
If you can’t patch tonight, do this now.
If an official fix is not yet available, disable or restrict access to the BetterImageGallery ImageHandler endpoint where feasible. Apply web server or WAF rules to block traversal patterns, including encoded traversal payloads. Limit the web application's filesystem permissions so the application identity cannot read unnecessary sensitive files. Monitor logs for suspicious requests targeting the BetterImageGallery API Controller or attempts to access Web.Config and similar sensitive paths. Rotating the ASP.NET MachineKey should be considered if exposure is suspected.
Patch, then assume compromise.
Upgrade mojoPortal to a fixed version if one is available from the vendor. The vulnerable BetterImageGallery API Controller ImageHandler action should be corrected to canonicalize and strictly validate user-supplied paths, restrict file access to an allowlisted base directory, and reject traversal sequences such as ../ and equivalent encoded variants. Sensitive files such as Web.Config should never be retrievable through application file-handling endpoints.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
5 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.