Summary
Togoder Security scanned the npm package whatwg-url@16.0.1 on Oct 6, 2026. An AI review of 14 source files produced 1 low severity finding. No malicious behavior, install-time payloads, credential theft or exfiltration were identified.
Findings 1
Dynamic code execution via eval
NPS-65BAE3D980CB
The initCtorRegistry function uses globalObject.eval('(async function* () {})').prototype to obtain the AsyncIteratorPrototype from the target realm. While eval is generally a red flag, this usage is constrained to a static string, occurs only when the global object lacks a cached constructor registry, and is wrapped in a try/catch fallback. It is a known pattern in webidl2js for cross-realm intrinsic lookup rather than an obfuscated payload or attacker-controlled execution.
Files reviewed
| File | Verdict | What the reviewer saw |
|---|---|---|
| index.js | safe | No malicious patterns detected; this is a legitimate WHATWG URL implementation entry point that only re-exports URL parsing and serialization utilities. |
| lib/Function.js | safe | No malicious patterns detected; the code is a standard WebIDL function converter wrapper with no exfiltration, obfuscation, or dynamic execution. |
| lib/URL-impl.js | safe | No malicious patterns detected |
| lib/URL.js | safe | This is a standard WebIDL-generated URL wrapper implementing the URL interface with no malicious patterns, network calls, filesystem access, or dynamic code execution. |
| lib/URLSearchParams-impl.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/URLSearchParams.js | safe | This is a standard jsdom-generated WebIDL wrapper for URLSearchParams with no malicious patterns, network calls, or credential access. |
| lib/VoidFunction.js | safe | No malicious patterns detected |
| lib/encoding.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/infra.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/percent-encoding.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/url-state-machine.js | safe | No malicious patterns detected; this is a standard WHATWG URL parser implementation with no data exfiltration, credential harvesting, dynamic code execution, or other suspicious behavior. |
| lib/urlencoded.js | safe | Cleared by Jev triage; no further analysis needed |
| lib/utils.js | safe | The file is a standard webidl2js utility module containing no data exfiltration, credential harvesting, obfuscation, backdoors, or suspicious process/network/file operations; the only notable pattern is a bounded eval for cross-realm intrinsic retrieval, which is low risk and expected for this library. |
| webidl2js-wrapper.js | safe | Cleared by Jev triage; no further analysis needed |
Affected version ranges
None of the 3 scanned versions of whatwg-url are flagged high or critical. The latest scanned version, 17.1.1, is clean. Only versions we have scanned are listed; unscanned versions between them are not covered.
| Versions | Verdict | Count | Range | Top findings |
|---|---|---|---|---|
| 16.0.1 – 17.1.1 | No issues | 2 | >=16.0.1 <=17.1.1 | |
| 8.7.0 – 11.0.0 | Not scanned | 2 | >=8.7.0 <=11.0.0 | |
| 5.0.0 | No issues | 1 | 5.0.0 |
Full list, including published versions not scanned yet: version ranges API.
Scanned versions of whatwg-url
Frequently asked questions
Is whatwg-url safe to use?
Our AI source review of whatwg-url@16.0.1 found no malicious code: no install-time payloads, credential theft, exfiltration, obfuscated loaders or backdoors.
Does whatwg-url contain malware?
No malware was identified in whatwg-url@16.0.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 whatwg-url checked?
Togoder Security downloaded the published npm package and had an AI model read its 14 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 whatwg-url 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 whatwg-url@16.0.1, cost nothing.