CVE-2026-54659 in pagyinfo

Summary

by MITRE • 07/29/2026

Pagy is agnostic pagination in plain Ruby. From 43.0.0 until 43.5.6, Pagy::I18n.locale= in gem/lib/pagy/modules/i18n/i18n.rb stored locale values verbatim and later used them as <locale>.yml path components, allowing untrusted params[:locale] values with absolute paths or ../ sequences to create a file existence and readability oracle for YAML files. This issue is fixed in version 43.5.6.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 07/29/2026

The vulnerability in Pagy gem versions 43.0.0 through 43.5.6 represents a critical path traversal and information disclosure flaw that exploits improper input validation in the internationalization localization mechanism. This vulnerability specifically affects the Pagy::I18n.locale= method which handles locale parameter values from external sources without adequate sanitization or validation, creating an attack surface where malicious actors can manipulate the locale setting to probe the underlying filesystem structure.

The technical implementation of this flaw occurs within the gem/lib/pagy/modules/i18n/i18n.rb file where the locale value is stored verbatim and subsequently used directly as components in YAML file path construction. When untrusted input from params[:locale] is processed, any sequence containing absolute paths or relative navigation patterns such as ../ can be interpreted by the YAML loader, allowing attackers to construct arbitrary file paths that point to system files accessible through the application's Ruby process permissions. This creates a file existence oracle where attackers can determine whether specific files exist on the filesystem based on error responses from the YAML parser.

The operational impact of this vulnerability extends beyond simple information disclosure, as it enables attackers to map the application's file system structure and potentially access sensitive configuration files, credential files, or other system resources that may be loaded through the YAML parsing mechanism. The attack vector is particularly dangerous because it requires minimal privileges and can be executed through standard parameter manipulation techniques. The vulnerability affects all applications using Pagy gem versions within the specified range, making it a widespread concern for Ruby web applications that rely on this pagination library.

This flaw aligns with CWE-22 Path Traversal and CWE-200 Information Disclosure vulnerabilities, demonstrating how improper input validation in configuration handling can create significant security risks. The vulnerability also maps to ATT&CK technique T1083 File and Directory Discovery, as it enables adversaries to enumerate system resources through indirect means. Organizations should immediately upgrade to Pagy version 43.5.6 or later to address this issue, while implementing additional input validation controls for locale parameters in their applications. The fix implemented in version 43.5.6 likely includes proper sanitization of locale values to prevent path traversal sequences from being passed to file system operations, ensuring that only valid locale identifiers can be processed through the internationalization framework.

Responsible

GitHub M

Reservation

06/15/2026

Disclosure

07/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Interested in the pricing of exploits?

See the underground prices here!