Description
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.
Published: 2026-07-28
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Pagy::I18n.locale= assigns locale strings directly to a configuration variable and later concatenates the value into a <locale>.yml path. Because no validation or sanitization occurs, an attacker can supply a locale string that contains an absolute path or path traversal sequence. When the gem attempts to load the corresponding YML file, it is able to reveal whether that file exists and is readable, creating a file existence and readability oracle. The flaw does not allow arbitrary code execution or denial of service but enables attackers to discover the presence of sensitive configuration or other readable files on the system.

Affected Systems

The vulnerability affects the ddnexus Pagy pagination library for Ruby. Versions from 43.0.0 up to and including 43.5.6 are impacted. Any Ruby application that uses one of these Pagy releases and allows external input to be assigned to I18n.locale, such as web applications or APIs handling user-provided locale parameters, is at risk.

Risk and Exploitability

With a CVSS score of 6.9 the flaw represents moderate severity. The EPSS score of less than 1% indicates that active exploitation is currently considered unlikely, and the vulnerability is not listed in the CISA KEV catalog. The most likely attack vector is the injection of a crafted locale value via a web request or API endpoint that does not perform input validation. Successful exploitation would allow an attacker to discover whether arbitrary files are present and readable, potentially leading to the exposure of configuration secrets or other sensitive data.

Generated by OpenCVE AI on August 3, 2026 at 14:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Pagy gem to version 43.5.6 or later.
  • If an immediate upgrade is not possible, validate or whitelist the locale value before assigning it to I18n.locale, restricting it to a known set of supported locale identifiers.
  • Limit file system permissions and monitor directory access controls to reduce the risk that sensitive files are readable by the application process.

Generated by OpenCVE AI on August 3, 2026 at 14:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2xmw-f8j8-wfxc Pagy I18n locale option is not validated before being used in a file path
History

Wed, 29 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Ddnexus
Ddnexus pagy
Vendors & Products Ddnexus
Ddnexus pagy

Wed, 29 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Pagy I18n locale option is not validated before being used in a file path
Weaknesses CWE-200
CWE-22
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T13:06:59.870Z

Reserved: 2026-06-15T20:16:46.199Z

Link: CVE-2026-54659

cve-icon Vulnrichment

Updated: 2026-07-29T13:04:54.779Z

cve-icon NVD

Status : Deferred

Published: 2026-07-28T23:17:09.067

Modified: 2026-07-30T19:19:45.637

Link: CVE-2026-54659

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T14:15:05Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')