frappe-datatable 1.22.0 dist bundles lodash 4.17.5 code (CVE-2020-28500 and others in range)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with package.json, yarn.lock, and src/utils.js to confirm the lodash range and bundled imports, then check how the project builds the files in dist/. Update the dependency resolution, rebuild the listed bundles, and verify they no longer contain the old lodash toNumber code. Done when the published bundles use a fixed lodash version and the dependency lockfile reflects it.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 223
- Avg merge
- 23h 14m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from frappe/datatable
-
Datatable stops responding to clicks after selecting across collapsed or scrolled-out rowsPossibly taken @RaphaelFakhri claimed this 24 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
Bug with serialNoColumn= falsePossibly taken @Valley-15 claimed this 295 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in frappe/datatable
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
HarperFast/rocksdb-js#1131 ·
Maintainers usually reply within 1 day
-
Reveal: resolved but blocked Pending boundary hides its fallbackPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anothaDev/luci-theme-vantage#137 ·
Maintainers usually reply within 1 day
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
wso2/api-platform#4369 ·
Maintainers usually reply within 1 day