Hunt prep
Before you test Node.js third-party modules
What 305 disclosed reports say about Node.js third-party modules: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 1
- median public bounty
- $250
- highest public bounty
- $250
Gaps worth testing 14
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Prototype pollution in path-setting helpers beyond the ones already reported
Prototype pollution Read the lesson
Many reports here cover dotted-path setters and merge helpers, yet the class keeps recurring in new packages. Review other npm path-setting or deep-merge utilities for missing checks on prototype-named keys and test whether a crafted nested key lands on the shared prototype.
Backed byproperty-expr - Prototype pollution (2020) [objtools] Prototype pollution (2020) [ts-dot-prop] Prototype Pollution (2020)+2 more reports
From the lessons: Libraries that set a value at a dotted or array property path, such as...; Object merge and extend helper packages on npm, where recursive mergin...; Feed a nested key named for the prototype into any merge or extend hel...; Pass a path whose first segment names the prototype into a path-settin...; Review recursive merge and dynamic assignment code for missing checks...
-
2
Prototype pollution gadgets that reach code execution in Node
Prototype pollution Read the lesson
Several reports show pollution in merge libraries and one shows a sandbox escape. Look for gadgets where a polluted property is later read by template rendering, console.table or child_process options, and test whether pollution alone changes behaviour or reaches execution.
Backed by[notevil] - Sandbox Escape Lead to RCE on Node.js and XSS in the... (2020) Prototype Pollution lodash 4.17.15 (2020) Arbitrary code execution via untrusted schemas in ajv (2020)+1 more report
From the lessons: EJS template rendering in Node, where polluted properties become gadge...; Node's console.table property handling.; Chain a server-side pollution into code execution without relying on t...; Pollute a property that EJS reads during rendering and check whether i...; Look for known gadget properties that applications read after a merge...
-
3
Command injection in modules that build shell strings
Command injection is the largest class here, with many packages concatenating input into exec calls. Pick sibling packages in the same families (system utilities, media converters, git wrappers) and test whether user-controlled arguments reach a shell without quoting.
-
4
Path traversal in static file servers via encoded and symlink paths
Path traversal Read the lesson
Static servers repeatedly fall to traversal through encoded dot segments or symlinks. Test other small static-server packages for the same root cause, including Windows backslash handling and symlink following, and check whether ignored files can still be read.
-
5
Stored XSS through filenames in directory listings
Directory listing pages that render filenames unescaped appear across many packages. Test other file-server and listing packages for the same output-encoding gap, including iframe and markup in names, and check whether the listing is served from the app origin.
-
6
ReDoS and resource exhaustion in parsers and validators
Several reports show ReDoS or validation DoS in parsers, including Fastify's ajv defaults. Test other schema validators, user-agent and colour parsers, and markdown or template renderers with crafted input and watch CPU and memory.
-
7
Cross-site websocket hijacking on socket.io deployments
Two reports show socket.io accepting cross-origin websocket connections. Test other websocket-backed Node apps for missing origin checks on the handshake and whether a cross-site page can open an authenticated socket and read or send messages.
-
8
SSRF bypasses in URL-fetching features
SSRF reports here include a bypass of an earlier fix and a blind case. Test other modules that fetch user-supplied URLs, focusing on redirects, DNS rebinding and alternate IP encodings that may slip past allowlists.
-
9
SQL injection in query builders and ORMs
Several reports show ORMs and query helpers failing to escape parameters. Test other query-building packages for injection through identifiers, order clauses and raw fragments, and check whether prototype pollution can alter query construction.
-
10
Uninitialised buffer reads from numeric input
Memory corruption Read the lesson
A cluster of reports shows buffer allocation from typed numeric input leaking memory or over-reading. Test other encoding and buffer helper packages with numeric and non-round inputs and check for out-of-bounds reads or leaked memory.
-
11
Open redirect and hostname parsing flaws in URL libraries
URL parsing packages here produced wrong hostnames and open redirects. Test other URL and redirect helpers with crafted hosts, backslashes and encoded characters, and check whether validation and redirect targets diverge.
-
12
Cache poisoning through versioned routes and CDN caching
One report shows Fastify versioned routes interacting badly with HTTP caches. Test other frameworks and route-versioning setups behind a cache for key confusion, and check whether responses for one version or user can be served to another.
-
13
Insecure deserialisation in Node packages
Two reports show insecure deserialisation leading to code injection. Test other packages that accept serialised input, such as sandbox or state-restore helpers, and check whether crafted data reaches eval or require.
-
14
Authentication and access-control gaps in auth helper modules
Access control Read the lesson
A few reports show improper authentication and IP allowlist bypass in auth middleware. Test other auth and session helper packages for logic that trusts client-supplied claims, headers or IP values, and check whether access decisions can be bypassed.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| DoS lesson | 31 | 1 | $250 | $250 | $250 |
| Path traversal lesson | 67 | 0 | – | – | $0 |
| RCE lesson | 66 | 0 | – | – | $0 |
| XSS lesson | 51 | 0 | – | – | $0 |
| Prototype pollution lesson | 38 | 0 | – | – | $0 |
| Memory corruption lesson | 13 | 0 | – | – | $0 |
| SQL injection lesson | 8 | 0 | – | – | $0 |
| SSRF lesson | 7 | 0 | – | – | $0 |
| Misconfiguration lesson | 5 | 0 | – | – | $0 |
| Info disclosure lesson | 4 | 0 | – | – | $0 |
| Access control lesson | 3 | 0 | – | – | $0 |
| CSRF lesson | 3 | 0 | – | – | $0 |
| Crypto lesson | 3 | 0 | – | – | $0 |
| Account takeover lesson | 2 | 0 | – | – | $0 |
| Cache bugs lesson | 1 | 0 | – | – | $0 |
| Open redirect lesson | 1 | 0 | – | – | $0 |
| File upload lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Bypass of SSRF Vulnerability
The URL and any URLs returned in the response should be resolved and re-checked against the filters before being fetched.
Disclosed
-
[curling] Remote Code Execution
The regular expression should be improved to properly validate input.
Disclosed
-
Supply Chain Pollution: Hunting a 16 Million Download/Week npm Package Vulnerability for a CTF Challenge
The vulnerability was fixed by the developer adding a blacklist of dangerous keys to the 'ini' package.
Disclosed
-
[chart.js] Prototype pollution
The suggested patch only recursively merges properties that are already own properties of the target object.
Disclosed
-
[last-commit-log] Command Injection
The fix is to wrap the --git-dir value in quotes so the shell treats it as a single argument; the report does not say whether this was applied.
Disclosed
-
[expressjs-ip-control] Whitelist IP bypass leads to authorization bypass and sensitive info disclosure
The module should not trust the X-Forwarded-For header for access decisions, as the reporter suggests in the patch.
Disclosed
-
[gfc] Command Injection via insecure command formatting
The module should avoid concatenating user input into shell commands and instead use child_process.execFile or child_process.spawn with separate arguments.
Disclosed
-
[create-git] RCE via insecure command formatting
The vulnerability was fixed by validating the input and replacing exec() with safer functions to execute commands.
Disclosed
-
[freespace] Command Injection due to Lack of Sanitization
All parameters should be sanitised before being sent as shell command arguments, for example by using the existing regex to whitelist or blacklist characters.
Disclosed
-
[tianma-static] Security issue with XSS.
The report suggests adding a content type header and changing decodeURI to decodeURIComponent or denying malicious paths, but does not state that a fix was applied.
Disclosed
-
[m-server] XSS reflected because path does not escapeHtml
The listing should HTML-escape the path and file names before inserting them, and path traversal should be stripped; the report proposes this patch but does not say it was applied.
Disclosed
-
[@knutkirkhorn/free-space] - Command Injection through Lack of Sanitization
The disk parameter should be sanitised before being passed to exec, for example by removing everything after a semicolon or double ampersand and ensuring the disk exists.
Disclosed
-
[authmagic-timerange-stateless-core] Improper Authentication
The token should be fully verified, not just its signature compared to the refresh token.
Disclosed
-
[flsaba] Stored XSS in the file and directory name when directories listing
The module should escape or sanitise file and directory names before inserting them into HTML.
Disclosed
-
[bl] Uninitialized memory exposure via negative .consume()
The copy() method should truncate the destination to the buffer offset, and consume() should reject negative or non-integer arguments.
Disclosed