Summary
Togoder Security scanned the npm package source-map-js@1.2.1 on Oct 6, 2026. An AI review of 11 source files produced 1 medium, 1 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.
Findings 2
dynamic code execution
NPS-DA4ACE302419
The cloneSort function uses new Function() to reconstruct the SortTemplate function from its string representation. While the string is derived from the library's own function (not external input), this technique is often used to evade static analysis and could be repurposed for obfuscation. It executes dynamically generated code at runtime.
weak random number generator for security-relevant pivot selection
NPS-D9D3F8ECE936
randomIntInRange uses Math.random(), which is not cryptographically secure. In a quicksort this is generally only a performance concern (avoiding worst-case O(n^2)), not a security issue, but it is noted as a use of non-crypto RNG.
Files reviewed
| File | Verdict | What the reviewer saw |
|---|---|---|
| lib/quick-sort.js | medium | The code is a legitimate Mozilla quicksort implementation, but it uses new Function() to dynamically reconstruct a function from its string representation, a pattern that is commonly associated with obfuscation and dynamic code execution despite the input here being internal and trusted. |
| lib/array-set.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/base64-vlq.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/base64.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/binary-search.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/mapping-list.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/source-map-consumer.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/source-map-generator.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/source-node.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/util.js | safe | Cleared by Jev triage; no further analysis needed |
| source-map.js | safe | Cleared by Jev triage; no further analysis needed |
Frequently asked questions
Is source-map-js safe to use?
No confirmed malware was found in source-map-js@1.2.1, but the review flagged 1 medium, 1 low severity findings for risky patterns worth checking before you rely on it.
Does source-map-js contain malware?
No malware was identified in source-map-js@1.2.1 when Togoder Security scanned it on Oct 6, 2026. A new version can still introduce malicious code, so scan the exact versions in your lockfile.
How was source-map-js checked?
Togoder Security downloaded the published npm package and had an AI model read its 11 source files, looking for install scripts, credential access, network exfiltration, obfuscation, backdoors and crypto-wallet theft. The results are cached by file hash and shown here.
How do I scan source-map-js together with the rest of my dependencies?
Upload your lockfile at https://security.togoder.click/scan or call the API documented at https://security.togoder.click/api-docs. Files that have already been scanned, like the ones in source-map-js@1.2.1, cost nothing.