@pdfme/common vulnerable to to XSS and Prototype Pollution through its expression evaluation
链接: https://github.com/advisories/GHSA-54xv-94qv-2gfg
仓库 Star: 3338
CVSS 评分: 6.1
参考链接:
描述:
Summary
The expression evaluation feature in pdfme 5.2.0 to 5.4.0 contains critical vulnerabilities allowing sandbox escape leading to XSS and prototype pollution attacks.
Details
1. Sandbox Escape Leading to XSS
The expression evaluator’s sandbox can be bypassed to execute arbitrary JavaScript code. Attackers can obtain the Function constructor through indirect methods:
1 |
|
Both payloads bypass the sandbox restrictions and execute Function("alert(location)")()
.
2. Prototype Pollution
The expression evaluator allows access to prototype accessor methods which can be exploited with Object.assign to pollute the prototype chain:
__lookupGetter__
__lookupSetter__
__defineGetter__
__defineSetter__
Impact
These vulnerabilities allow attackers to:
- Execute arbitrary JavaScript code in the context of the application
- Steal sensitive information including cookies and tokens
- Modify application behavior through prototype pollution
- Potentially perform actions on behalf of users
Proof of Concept
Loading the following template in pdfme triggers alert(location)
:
1 |
|