# source-map-js@1.2.1 security report (npm)

- Verdict: **Needs review** (risk level: medium)
- Scanned: 2026-10-06T14:24:28.000Z
- Files reviewed: 11
- Findings: 1 medium, 1 low severity findings
- Report: https://security.togoder.click/npm/source-map-js
- Source: Togoder Security (https://security.togoder.click), AI source-code review

## 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

### [medium] dynamic code execution

Finding ID: `NPS-DA4ACE302419`

File: `lib/quick-sort.js:122`

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.

### [low] weak random number generator for security-relevant pivot selection

Finding ID: `NPS-D9D3F8ECE936`

File: `lib/quick-sort.js:47`

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

- `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

AI analysis is guidance, not a guarantee. Methodology: https://security.togoder.click/methodology
