frappe-datatable 1.22.0 dist bundles lodash 4.17.5 code (CVE-2020-28500 and others in range)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
Direzione di ricerca
Inizia da package.json, yarn.lock e src/utils.js per confermare l’intervallo di versioni di lodash e gli import inclusi nei bundle, quindi verifica come il progetto genera i file in dist/. Aggiorna la risoluzione delle dipendenze, ricostruisci i bundle elencati e verifica che non contengano più il vecchio codice toNumber di lodash. Il lavoro è completato quando i bundle pubblicati usano una versione corretta di lodash e il file di lock delle dipendenze la riflette.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
While scanning published npm packages for bundled third-party code we found that [email protected] (npm latest) inlines lodash 4.17.5 code into dist/frappe-datatable.cjs.js (the package main), dist/frappe-datatable.js and dist/frappe-datatable.min.js. Rollup bundles lodash/throttle, lodash/debounce and lodash/uniq (src/utils.js:1-3) from the lodash that yarn.lock pins, which is 4.17.5. package.json declares lodash ^4.17.5, so for anyone installing frappe-datatable npm resolves a current lodash (4.18.1), and npm audit and SCA tools report lodash as fixed while main runs the 4.17.5 code.
lodash 4.17.5 is in the range of these advisories:
- lodash 4.17.5 (
debounce/throttlewith theirtoNumberhelper, anduniq):- CVE-2020-28500 (GHSA-29mw-wpgm-hmr9): ReDoS in
toNumber,trimandtrimEnd(fixed 4.17.21) - CVE-2021-23337 (GHSA-35jh-r3h4-6jhm): command injection in
template(fixed 4.17.21) - CVE-2020-8203 (GHSA-p6mc-m468-83gw): prototype pollution in
zipObjectDeep(fixed 4.17.19) - CVE-2019-10744 (GHSA-jf85-cpcp-j695): prototype pollution in
defaultsDeep(fixed 4.17.12) - CVE-2019-1010266 (GHSA-x5rq-j2xg-h7qm): ReDoS on very long input strings (fixed 4.17.11)
- CVE-2018-16487 (GHSA-4xc9-xhrj-v574): prototype pollution in
merge,mergeWithanddefaultsDeep(fixed 4.17.11) - CVE-2025-13465 (GHSA-xxjr-mmjv-4gpg): prototype pollution in
unset,omitandpullAt(fixed 4.17.23) - CVE-2026-4800 (GHSA-r5fr-rjxr-66jc): code injection via
templateimports key names (fixed 4.18.0)
- CVE-2020-28500 (GHSA-29mw-wpgm-hmr9): ReDoS in
Only debounce, throttle, uniq and their helpers are in the bundle, so of these only CVE-2020-28500 concerns code that ships: the bundled toNumber still trims with /^\s+|\s+$/g.
We did not find a way for these to lead to an exploit through frappe-datatable: the bundled toNumber is only applied to the wait/maxWait arguments of debounce/throttle, which are numeric constants in the datatable's own code (300 ms and 50 ms). Because the copies ship where dependency audits cannot see them, they are easy to miss. We would suggest updating when convenient.
Suggested fix: update yarn.lock so lodash@^4.17.5 resolves to >= 4.18.0 (for example by raising the declared range to ^4.18.0), rebuild dist/ and publish.
Reproduction
Checked against the published tarballs on 2026-11-06 (npm latest):
npm pack [email protected] [email protected]
mkdir d l
tar xzf frappe-datatable-1.22.0.tgz -C d; tar xzf lodash-4.17.21.tgz -C l
grep -c 'baseTrim' d/package/dist/frappe-datatable.cjs.js l/package/toNumber.js # added in lodash 4.17.21
Expected: a non-zero count for dist/frappe-datatable.cjs.js.
Actual:
d/package/dist/frappe-datatable.cjs.js:0
l/package/toNumber.js:2
dist/frappe-datatable.cjs.js:482 still has var reTrim = /^\s+|\s+$/g;, used by toNumber at line 533 (dist/frappe-datatable.js:495/546 is the same, and the regex is also in dist/frappe-datatable.min.js).
Additional context
yarn.lock on master (5e2aa92) resolves lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0 to 4.17.5. Dependabot's #134 (2021) proposed bumping that entry to 4.17.21; it was closed unmerged on 2023-06-17 together with 20 other Dependabot PRs, with no comment, so the pin has not changed since.
- Lingua principale
- JavaScript
- Stelle
- 1.3k
- Fork
- 223
- Merge medio
- 23h 14m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di frappe/datatable
-
Datatable stops responding to clicks after selecting across collapsed or scrolled-out rowsForse già presa @RaphaelFakhri l’ha presa 25 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
Bug with serialNoColumn= falseForse già presa @Valley-15 l’ha presa 295 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di frappe/datatable
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
ai-amazon-bedrock: a tool result that isn't a JSON object fails the next requestForse già presa @effect-bot l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
[bug] Toolchain versions from `.prototools` are not inherited when moon runs from a subdirectoryAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Edit: Tele1 Logo [SV]Apertacheck:passed logos:edit
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno