REDHAT-BUG-2440992: High severity jsPDF jsPDF vulnerability
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the first argument of the addImage method results in denial of service. If given the possibility to pass unsanitized image data or URLs to the addImage method, a user can provide a harmful GIF file that results in out of memory errors and denial of service. Harmful GIF files have large width and/or height entries in their headers, which lead to excessive memory allocation. Other affected methods are: html. The vulnerability has been fixed in jsPDF 4.2.0. As a workaround, sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
jsPDFto a version that resolves this vulnerability.Fixed in 4.2.0 - Configuration
As a workaround, sanitize image data or URLs before passing them to the jsPDF addImage method. Also ensure unsanitized image data/URLs are not passed to other affected methods (including html) to prevent out-of-memory denial of service via harmful GIF headers.
jsPDF Input handling for addImage (and other affected methods including html) = sanitized image data and sanitized URLs before calling addImage
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2440992?
The severity of REDHAT-BUG-2440992 is high with a rating of 7.
What is the risk associated with REDHAT-BUG-2440992?
The risk associated with REDHAT-BUG-2440992 is categorized as 33.
How do I fix REDHAT-BUG-2440992?
To fix REDHAT-BUG-2440992, upgrade jsPDF to version 4.2.0 or later.
What type of vulnerability is identified in REDHAT-BUG-2440992?
REDHAT-BUG-2440992 identifies a denial of service vulnerability due to unsanitized image data in the jsPDF library.
Which method in jsPDF is affected by REDHAT-BUG-2440992?
The affected method in jsPDF is the `addImage` method.