PT-2026-65621 · Rubygems · Pagy

CVE-2026-54659

·

Published

2026-07-28

·

Updated

2026-07-28

CVSS v4.0

6.9

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions Pagy versions 43.0.0 through 43.5.5
Description In the Pagy::I18n.locale= setter within gem/lib/pagy/modules/i18n/i18n.rb, locale values are stored verbatim and subsequently used as path components to load YAML dictionary files. When an application assigns unsanitized user input to the locale, such as through the params[:locale] variable, an attacker can use absolute paths or directory traversal sequences (e.g., ../) to redirect the file lookup outside the intended locales directory. While the software's structural checks prevent the file contents from being returned in the response, this behavior creates a file existence and readability oracle for .yml files on the host, as the system's response differs based on whether the targeted file exists and is readable.
Recommendations Update Pagy to version 43.5.6. As a temporary workaround, validate the locale before assignment by applying a BCP 47 shape constraint to the params[:locale] variable or restricting it to a known set of trusted locales.

Fix

Path traversal

Information Disclosure

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-54659
GHSA-2XMW-F8J8-WFXC

Affected Products

Pagy