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

Medium 6.9 Published Updated

Attackers can manipulate locale parameters to read arbitrary YAML files via path traversal in the Pagy Ruby library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-54659?

CVE-2026-54659 is a medium-severity path traversal vulnerability in ddnexus pagy, published on 28 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-22, CWE-200

Which versions are affected by CVE-2026-54659?

2 open source packages ship an affected version, including pagy.

PackageAffectedFixed in
pagy RubyGemsFrom 43.0.043.5.6
pagy RubyGemsFrom 43.0.043.5.6

How do I fix CVE-2026-54659?

Upgrade pagy to 43.5.6 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-54659 being exploited?

There is no known exploitation of CVE-2026-54659 in the wild and no public exploit code.

Sources

Also known as GHSA-2xmw-f8j8-wfxc, UBUNTU-CVE-2026-54659.

Is CVE-2026-54659 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free