Commit f9d3361
authored
chore(deps): update dependency jspdf to v4.1.0 [security] (#1978)
This PR contains the following updates:
| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [jspdf](https://redirect.github.com/parallax/jsPDF) | [`4.0.0` →
`4.1.0`](https://renovatebot.com/diffs/npm/jspdf/4.0.0/4.1.0) |

|

|
### GitHub Vulnerability Alerts
####
[CVE-2026-24040](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-cjw8-79x6-5cj4)
### Impact
The addJS method in the jspdf Node.js build utilizes a shared
module-scoped variable (text) to store JavaScript content. When used in
a concurrent environment (e.g., a Node.js web server), this variable is
shared across all requests.
If multiple requests generate PDFs simultaneously, the JavaScript
content intended for one user may be overwritten by a subsequent request
before the document is generated. This results in Cross-User Data
Leakage, where the PDF generated for User A contains the JavaScript
payload (and any embedded sensitive data) intended for User B.
Typically, this only affects server-side environments, although the same
race conditions might occur if jsPDF runs client-side.
```js
import { jsPDF } from "jspdf";
const docA = new jsPDF();
const docB = new jsPDF();
// 1. User A sets their script (stored in shared 'text' variable)
docA.addJS('console.log("Secret A");');
// 2. User B sets their script (overwrites shared 'text' variable)
docB.addJS('console.log("Secret B");');
// 3. User A saves their PDF (reads current 'text' variable)
docA.save("userA.pdf");
// Result: userA.pdf contains "Secret B" instead of "Secret A"
```
### Patches
The vulnerability has been fixed in jspdf@4.0.1. The fix moves the
shared variable into the function scope, ensuring isolation between
instances.
### Workarounds
Avoid using the addJS method in concurrent server-side environments. If
usage is required, ensure requests are processed sequentially (e.g.,
using a queue) rather than in parallel.
####
[CVE-2026-24043](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-vm32-vv63-w422)
### Impact
User control of the first argument of the `addMetadata` function allows
users to inject arbitrary XML.
If given the possibility to pass unsanitized input to the `addMetadata`
method, a user can inject arbitrary XMP metadata into the generated PDF.
If the generated PDF is signed, stored or otherwise processed after, the
integrity of the PDF can no longer be guaranteed.
Example attack vector:
```js
import { jsPDF } from "jspdf"
const doc = new jsPDF()
// Input a string that closes the current XML tag and opens a new one.
// We are injecting a fake "dc:creator" (Author) to spoof the document source.
const maliciousInput = '</jspdf:metadata></rdf:Description>' +
'<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/">' +
'<dc:creator>TRUSTED_ADMINISTRATOR</dc:creator>' + // <--- Spoofed Identity
'</rdf:Description>' +
'<rdf:Description><jspdf:metadata>'
// The application innocently adds the user's input to the metadata
doc.addMetadata(maliciousInput, "http://valid.namespace")
doc.save("test.pdf")
```
### Patches
The vulnerability has been fixed in jsPDF@4.1.0
### Workarounds
Sanitize user input before passing it to the `addMetadata` method:
escape XML entities. For example:
```js
let input = "..."
input = input
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'")
doc.addMetadata(input)
```
####
[CVE-2026-24133](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-95fx-jjr5-f39c)
### Impact
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 BMP file that results in
out of memory errors and denial of service. Harmful BMP files have large
width and/or height entries in their headers, wich lead to excessive
memory allocation.
Other affected methods are: `html`.
Example attack vector:
```js
import { jsPDF } from "jspdf"
// malicious BMP image data with large width/height headers
const payload = ...
const doc = new jsPDF();
doc.addImage(payload, "BMP", 0, 0, 100, 100);
```
### Patches
The vulnerability has been fixed in jsPDF 4.1.0. Upgrade to
jspdf@>=4.1.0.
### Workarounds
Sanitize image data or URLs before passing it to the addImage method or
one of the other affected methods.
####
[CVE-2026-24737](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-pqxr-3g65-p328)
### Impact
User control of properties and methods of the Acroform module allows
users to inject arbitrary PDF objects, such as JavaScript actions.
If given the possibility to pass unsanitized input to one of the
following methods or properties, a user can inject arbitrary PDF
objects, such as JavaScript actions, which are executed when the victim
opens the document. The vulnerable API members are:
* `AcroformChoiceField.addOption`
* `AcroformChoiceField.setOptions`
* `AcroFormCheckBox.appearanceState`
* `AcroFormRadioButton.appearanceState`
Example attack vector:
```js
import { jsPDF } from "jspdf"
const doc = new jsPDF();
var choiceField = new doc.AcroFormChoiceField();
choiceField.T = "VulnerableField";
choiceField.x = 20;
choiceField.y = 20;
choiceField.width = 100;
choiceField.height = 20;
// PAYLOAD:
// 1. Starts with "/" to bypass escaping.
// 2. "dummy]" closes the array.
// 3. "/AA" injects an Additional Action (Focus event).
// 4. "/JS" executes arbitrary JavaScript.
const payload = "/dummy] /AA << /Fo << /S /JavaScript /JS (app.alert('XSS')) >> >> /Garbage [";
choiceField.addOption(payload);
doc.addField(choiceField);
doc.save("test.pdf");
```
### Patches
The vulnerability has been fixed in jsPDF@4.1.0.
### Workarounds
Sanitize user input before passing it to the vulnerable API members.
### Credits
Research and fix: Ahmet Artuç
---
### Release Notes
<details>
<summary>parallax/jsPDF (jspdf)</summary>
###
[`v4.1.0`](https://redirect.github.com/parallax/jsPDF/releases/tag/v4.1.0)
[Compare
Source](https://redirect.github.com/parallax/jsPDF/compare/v4.0.0...v4.1.0)
This release fixes several security issues.
#### What's Changed
- Upgrade optional dompurify dependency to 3.3.1 in
[#​3948](https://redirect.github.com/parallax/jsPDF/pull/3948)
- Fix [PDF Injection in AcroForm module allows Arbitrary JavaScript
Execution](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-pqxr-3g65-p328)
vulnerability
- Fix [Stored XMP Metadata Injection (Spoofing & Integrity
Violation)](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-vm32-vv63-w422)
vulnerability
- Fix [Shared State Race Condition in addJS
Method](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-cjw8-79x6-5cj4)
vulnerability
- Fix [Denial of Service (DoS) via Unvalidated BMP Dimensions in
BMPDecoder](https://redirect.github.com/parallax/jsPDF/security/advisories/GHSA-95fx-jjr5-f39c)
vulnerability
**Full Changelog**:
<parallax/jsPDF@v4.0.0...v4.1.0>
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/splunk/addonfactory-ucc-generator).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NS4yIiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMiIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>1 parent 25ac630 commit f9d3361
1 file changed
+31
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
| 1015 | + | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
1019 | 1019 | | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
| |||
3959 | 3959 | | |
3960 | 3960 | | |
3961 | 3961 | | |
3962 | | - | |
| 3962 | + | |
3963 | 3963 | | |
3964 | 3964 | | |
3965 | 3965 | | |
| |||
4018 | 4018 | | |
4019 | 4019 | | |
4020 | 4020 | | |
4021 | | - | |
| 4021 | + | |
4022 | 4022 | | |
4023 | 4023 | | |
4024 | 4024 | | |
| |||
5080 | 5080 | | |
5081 | 5081 | | |
5082 | 5082 | | |
5083 | | - | |
| 5083 | + | |
5084 | 5084 | | |
5085 | 5085 | | |
5086 | 5086 | | |
| |||
5349 | 5349 | | |
5350 | 5350 | | |
5351 | 5351 | | |
5352 | | - | |
| 5352 | + | |
5353 | 5353 | | |
5354 | 5354 | | |
5355 | 5355 | | |
| |||
5665 | 5665 | | |
5666 | 5666 | | |
5667 | 5667 | | |
5668 | | - | |
5669 | | - | |
5670 | | - | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
5671 | 5671 | | |
5672 | 5672 | | |
5673 | 5673 | | |
| |||
5796 | 5796 | | |
5797 | 5797 | | |
5798 | 5798 | | |
5799 | | - | |
| 5799 | + | |
5800 | 5800 | | |
5801 | 5801 | | |
5802 | 5802 | | |
| |||
6271 | 6271 | | |
6272 | 6272 | | |
6273 | 6273 | | |
6274 | | - | |
6275 | | - | |
6276 | | - | |
6277 | | - | |
| 6274 | + | |
| 6275 | + | |
| 6276 | + | |
| 6277 | + | |
6278 | 6278 | | |
6279 | 6279 | | |
6280 | 6280 | | |
| |||
7052 | 7052 | | |
7053 | 7053 | | |
7054 | 7054 | | |
7055 | | - | |
| 7055 | + | |
7056 | 7056 | | |
7057 | 7057 | | |
7058 | 7058 | | |
| |||
7652 | 7652 | | |
7653 | 7653 | | |
7654 | 7654 | | |
7655 | | - | |
| 7655 | + | |
7656 | 7656 | | |
7657 | 7657 | | |
7658 | 7658 | | |
| |||
9276 | 9276 | | |
9277 | 9277 | | |
9278 | 9278 | | |
9279 | | - | |
9280 | | - | |
9281 | | - | |
| 9279 | + | |
| 9280 | + | |
| 9281 | + | |
9282 | 9282 | | |
9283 | 9283 | | |
9284 | 9284 | | |
9285 | 9285 | | |
9286 | 9286 | | |
9287 | 9287 | | |
9288 | 9288 | | |
9289 | | - | |
| 9289 | + | |
9290 | 9290 | | |
9291 | 9291 | | |
9292 | 9292 | | |
| |||
10776 | 10776 | | |
10777 | 10777 | | |
10778 | 10778 | | |
10779 | | - | |
| 10779 | + | |
10780 | 10780 | | |
10781 | 10781 | | |
10782 | 10782 | | |
| |||
11141 | 11141 | | |
11142 | 11142 | | |
11143 | 11143 | | |
11144 | | - | |
| 11144 | + | |
11145 | 11145 | | |
11146 | 11146 | | |
11147 | 11147 | | |
| |||
11411 | 11411 | | |
11412 | 11412 | | |
11413 | 11413 | | |
11414 | | - | |
| 11414 | + | |
11415 | 11415 | | |
11416 | 11416 | | |
11417 | 11417 | | |
| |||
11596 | 11596 | | |
11597 | 11597 | | |
11598 | 11598 | | |
11599 | | - | |
| 11599 | + | |
11600 | 11600 | | |
11601 | 11601 | | |
11602 | 11602 | | |
| |||
12073 | 12073 | | |
12074 | 12074 | | |
12075 | 12075 | | |
12076 | | - | |
| 12076 | + | |
12077 | 12077 | | |
12078 | 12078 | | |
12079 | 12079 | | |
| |||
12420 | 12420 | | |
12421 | 12421 | | |
12422 | 12422 | | |
12423 | | - | |
| 12423 | + | |
12424 | 12424 | | |
12425 | 12425 | | |
12426 | 12426 | | |
| |||
12476 | 12476 | | |
12477 | 12477 | | |
12478 | 12478 | | |
12479 | | - | |
| 12479 | + | |
12480 | 12480 | | |
12481 | 12481 | | |
12482 | 12482 | | |
| |||
13044 | 13044 | | |
13045 | 13045 | | |
13046 | 13046 | | |
13047 | | - | |
| 13047 | + | |
13048 | 13048 | | |
13049 | 13049 | | |
13050 | 13050 | | |
| |||
0 commit comments