| Titel | Toss es-toolkit >= 1.26.0, < 1.53.1 (up to 1.53.0) Code Injection |
|---|
| Beschreibung | A code injection vulnerability exists in the template() function of es-toolkit/compat (es-toolkit >= 1.26.0, < 1.53.1).
Affected file: src/compat/string/template.ts (sink: new Function, line 187)
Affected function: template() (exported only via es-toolkit/compat)
Affected parameters:
- options.variable: inserted into the generated function's parameter list; can close it and inject a function body
- keys of options.imports: used as parameter names; a default-value expression in a key runs when the function is called
- options.sourceURL: placed in a //# sourceURL= comment; only CR/LF are stripped, so U+2028/U+2029 can end the comment and inject code
Code runs when the template is compiled, even if it is never rendered and no data is passed. In Node.js this leads to remote code execution with access to require, process and the filesystem; in a browser, script execution in the page's origin. Exploitation requires part of options to come from untrusted input. The root es-toolkit entry is not affected.
CVSS: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (8.1)
The vendor confirmed the issue in an official GitHub Security Advisory (published 2026-11-06) and fixed it in 1.53.1.
CVE status: the vendor advisory was published without a CVE ID. As of 2026-11-10 no CVE has been assigned, and the vendor has not indicated whether it will request one from GitHub CNA.
Product: https://github.com/toss/es-toolkit
Package: https://www.npmjs.com/package/es-toolkit
Fixed version: https://www.npmjs.com/package/es-toolkit/v/1.53.1 |
|---|
| Quelle | ⚠️ https://github.com/toss/es-toolkit/security/advisories/GHSA-mc5p-3gj7-h877 |
|---|
| Benutzer | brad (UID 97565) |
|---|
| Einreichung | 10.11.2026 04:42 (vor 24 Tagen) |
|---|
| Moderieren | 04.12.2026 09:26 (24 days later) |
|---|
| Status | Akzeptiert |
|---|
| VulDB Eintrag | 449626 [toss es-toolkit bis 1.53.0 template.ts template erweiterte Rechte] |
|---|
| Punkte | 20 |
|---|