What the vulnerability does
01Description
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in gravity2pdf Gravity 2 PDF gf2pdf allows Reflected XSS.This issue affects Gravity 2 PDF: from n/a through <= 3.1.3.
Explanation of Vulnerability in Simple Terms
02Summary
Gravity 2 PDF versions up to 3.1.3 contain a cross-site scripting (XSS) vulnerability that allows attackers to inject malicious scripts into PDF generation. An attacker can craft a malicious link or page that, when visited by a site user, executes arbitrary JavaScript in the user's browser within the site's security context. The vulnerability affects all users and can lead to session hijacking, credential theft, or defacement.
What an attacker can do
03Attacker Capabilities
Inject and execute malicious JavaScript in a user's browser when they interact with a crafted PDF or link.
Potential impact on your site
04Site Impact
Site visitors' sessions and credentials can be compromised; attackers can deface content or steal sensitive data from users.
Conditions required to exploit
05Prerequisites
A site user must visit a malicious link or page that triggers the vulnerable PDF generation feature.
Key dates
06Disclosure timeline
March 26, 2025
CVE published
April 28, 2026
Record updated