Intel

AIKIDO-2026-274638

pagy is vulnerable to HTML Injection

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 21, 2026
July 21, 2026

31

CVE Score

Low

HTML Injection

Are you affected? Scan for Free

TL;DR

pagy builds pagination link href attributes by interpolating a composed query string directly into HTML without HTML-escaping it. Because the & separators between query parameters are emitted raw, an HTML parser can decode a following parameter name that begins with a legacy named character reference as an HTML entity. Reflected untrusted request parameters can therefore change the parsed link URL and the parameters a victim sends when following a pagination link. The fix HTML-escapes the composed URL with CGI.escapeHTML before placing it in the href attribute.

How do I fix this?

Upgrade the pagy library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application reflects untrusted request parameters into pagy pagination links.

Package

Versions

1.0.0 - 43.6.0

Fixed in 43.6.1

Background info

pagy is vulnerable to HTML Injection in versions 1.0.0 - 43.6.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea