middleware-protection
Fail
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
- COMMAND_EXECUTION (HIGH): The script
scripts/configure-routes.shcontains a command injection vulnerability. - Evidence: In the
interactive_configfunction, the script reads user input into variables likePUBLIC_ROUTESand then incorporates them into a command string (cmd) wrapped in single quotes. This string is then executed usingeval "$cmd". - Impact: An attacker or malicious prompt could provide input such as
'/'; touch HACKED; 'which would break out of the intended command and execute arbitrary shell commands on the host system. - DYNAMIC_EXECUTION (MEDIUM): The script
scripts/generate-middleware.shis vulnerable to code injection in the files it generates. - Evidence: The
convert_routesfunction uses string concatenation to wrap route names in single quotes:result+="'${ROUTE_ARRAY[$i]}'". It does not escape or sanitize internal single quotes. - Impact: If a project contains a file with a name like
app/test'); console.log('injected'); //page.tsx, the generatedmiddleware.tswill contain executable code outside of the intended string array, leading to arbitrary JavaScript execution when the middleware runs. - DATA_EXFILTRATION (SAFE): While
scripts/test-protection.shusescurlto interact with network resources, it is limited to testing the availability of local routes (localhost:3000by default) and does not exhibit patterns of sensitive data exfiltration. - PROMPT_INJECTION (SAFE): The instructions in
SKILL.mdappear benign and focused on the stated purpose of configuring authentication middleware. No attempt to bypass system guards or extract system prompts was detected.
Recommendations
- AI detected serious security threats
Audit Metadata