Code Security Scanner
Read the JavaScript a page ships for dangerous inline patterns, known-vulnerable library versions, and tokens that were left in the bundle.
Critical27High46Medium28Low10Info9
Critical27 checks
- Form Submits Data Over Insecure HTTPAn HTTPS page contains a form that submits data to an HTTP endpoint.
- child_process.exec with concatenated command stringchild_process.exec(cmd) always routes cmd through /bin/sh (or cmd.exe), so exec("..." + userInput) or exec(`...${userInput}`) lets any shell metacharacter in userInput (& ; | $ ` \n) execute attacker commands.
- document.write with JSON.parse(userInput)Combining document.write with JSON.parse(userInput) reflects attacker-controlled string values straight into the document, where any <script> or on* attribute is executed before any sanitizer can intercept it.
- child_process.spawn with shell:truespawn(cmd, { shell: true }) or spawn("sh -c " + cmd) re-routes the command through /bin/sh, so any unescaped metacharacter in arguments (& ; | $ ` \n) executes attacker commands.
- os.exec / os.system / os.popen usagePython's os.system, os.exec*, and os.popen pass their string argument to the shell. Any user-controlled portion executes as a shell command.
- String-built /bin/sh invocationPatterns like os.system("/bin/sh -c '" + userInput + "'") or exec("sh -c " + userInput) build a shell command via concatenation or interpolation, embedding attacker input into a parsed shell string.
- Raw query string concatenationdb.query("SELECT * FROM users WHERE id = '" + userId + "'") or knex.raw(`SELECT * FROM x WHERE id = ${userId}`) build a SQL string from user input, enabling classic SQL injection.
- SQL via template literal interpolationTag-less template literals like pool.query(`SELECT * FROM t WHERE id = ${id}`) interpolate user input directly into SQL text. Tagged sql`` libraries are safe; bare backticks are not.
- yaml.load without safe loaderyaml.load(input) uses the unsafe Loader by default and instantiates arbitrary Python objects via !!python/object tags. yaml.safe_load rejects those tags.
- pickle.loads on untrusted bytespickle.loads(untrusted_bytes) reconstructs arbitrary Python objects and executes their __reduce__ method. Crafted pickles achieve arbitrary code execution at parse time.
- atob/base64 + eval chainPatterns like eval(atob(payload)) or eval(Buffer.from(payload,'base64').toString()) decode and immediately execute attacker-supplied JavaScript. The base64 layer adds nothing; eval still runs the result.
- JSON.parse piped into new Functionnew Function('return ' + JSON.parse(input)) or new Function(JSON.parse(input).body) constructs a function body from parsed JSON. The parsed JSON still ships attacker-controlled source code.
- node-serialize deserialize()node-serializes serialize/deserialize supports an IIFE payload (rce: _$ND_FUNC$$ = function(){...}()). The deserialize() call evaluates that payload and executes attacker JavaScript on the server.
- PHP unserialize on user inputunserialize($_COOKIE['x']) or unserialize($request->body) can trigger __wakeup, __destruct, or other magic methods on attacker-chosen classes, leading to RCE via POP gadget chains.
- jwt.verify called with an empty or undefined secretjwt.verify(token, '') or jwt.verify(token, undefined) passes an empty or missing key as the signing secret. Depending on the library and algorithm, this can let a token signed with a predictable or empty key pass verification.
- JWT verifier allows alg: nonejwt.verify(token, secret, { algorithms: ['none'] }) explicitly allows the 'none' algorithm, so an attacker can send a token with alg:none and no signature and have it accepted.
- Passwords stored in sessionStoragesessionStorage.setItem('password', pwd) or sessionStorage.setItem('pwd', val) keeps plaintext credentials in the browser for the lifetime of the tab. Any XSS reads it instantly.
- Hardcoded AWS credentials in @aws-sdkPatterns like new S3Client({ accessKeyId: 'AKIA...', secretAccessKey: '...' }) embed long-lived IAM keys directly into source. Once the source is logged or committed, the keys are compromised.
- SQL injection pattern in sourceString concatenation or template literals used to build SQL queries with what appears to be user-controlled input.
- Hard-coded password in sourceA password, passwd or pwd assignment in the source holds a literal value that looks like a real secret rather than UI copy, a placeholder, a route or a translated label. Keys named admin or root are not treated as credentials: their values are routes, class names and role labels, and default administrator logins are covered by the default-credentials and insecure-auth checks instead.
- Hard-coded secret values in sourceAPI keys, tokens, or secret strings are embedded directly in the source code.
- Node.js vm Module Executed With Request DataNode's vm module (runInNewContext, runInThisContext, runInContext, or vm.Script) is invoked with request-derived source code.
- GroovyShell.evaluate() Called With Request DataA GroovyShell instance's evaluate() method is called directly with request data.
- PHP assert()/create_function() Code Execution RiskPHP's assert() is called with user-controlled input, or the deprecated create_function() (which internally uses eval()) is present.
- .NET BinaryFormatter DeserializationThe .NET BinaryFormatter class is instantiated or used to deserialize data.
- Java ObjectInputStream Deserializes Request DataAn ObjectInputStream is constructed directly from request data and readObject() is called on it.
- Ruby Marshal.load() Called With Request DataRuby's Marshal.load() is called directly with params/request data.
High46 checks
- Potential Command Injection VectorsCode patterns that execute system commands, potentially vulnerable to command injection.
- JWT Decoded Without Signature Verificationjwt.decode() is called to read a token's claims, but jwt.verify() is never called anywhere in the same source. jwt.decode() does not check the signature, so any attacker-forged token decodes just as successfully as a legitimately signed one.
- Potential Path Traversal VulnerabilityFile operations with user-controlled paths that could allow directory traversal.
- Insecure Authentication Mechanisms DetectedAuthentication security issues that could compromise user sessions.
- Potential Insecure DeserializationDeserialization operations on potentially untrusted data.
- document.write DOM XSS Sinkdocument.write() call detected.
- Path Traversal IndicatorsPath traversal sequences in URL parameters.
- Template Injection IndicatorsTemplate syntax detected in output.
- eval() Code Injection RiskJavaScript eval() function calls detected.
- Function Constructor Usagenew Function() usage detected.
- setInterval with string argsetInterval('code', 1000) is implicitly eval(). Pass a function reference instead.
- jQuery .html() with user input$el.html(userInput) executes arbitrary HTML. Always escape or use .text().
- insertAdjacentElement XSS sinkinsertAdjacentElement splices a live DOM node into the document. When the node is built from attacker-controlled input, it bypasses HTML-string sanitizers because no HTML parsing is performed.
- Range.createContextualFragment XSS sinkRange.createContextualFragment(fragString) parses HTML and returns a DocumentFragment. Passing user-controlled HTML directly into the fragment lets attackers inject <script> or event-handler nodes that execute immediately on insertion.
- dangerouslySetInnerHTML with computed valuedangerouslySetInnerHTML={{ __html: buildHtml(userInput) }} constructs the HTML string at render time from attacker-controlled parts, defeating any earlier sanitization that operated on the raw field alone.
- Vue v-html with computed expression<div v-html="computed(userInput)"></div> evaluates a computed expression that mixes user data into HTML; any <script> or event-handler tags are inserted verbatim.
- Angular bypassSecurityTrust* with user inputCalling bypassSecurityTrustHtml(userInput) or bypassSecurityTrustScript(userInput) tells Angular the value is safe, completely defeating its built-in DomSanitizer.
- subprocess.Popen / os.popen with user inputsubprocess.Popen(builtString, shell=True) and os.popen(builtString) both run their input through a shell. Even partial user influence over arguments enables command injection via metacharacters.
- child_process.spawn/execFile concatenated argsspawn("git " + userArg) or execFile(`tool ${userArg}`) builds an argument string via concatenation. Although execFile itself does not invoke a shell, the embedded space allows attackers to inject additional flags or arguments.
- MongoDB $where injectionMongoDB queries of the form { $where: "this.field == '" + userInput + "'" } or { $where: Function("return this.x == '" + userInput + "'") } embed user input into JavaScript that runs server-side on every document in the collection.
- Mongoose find with user JSONModel.find(JSON.parse(req.body)) passes a user-supplied object directly into a Mongo query. Attackers can inject query operators like $where, $regex, or $ne to bypass access control.
- Sequelize.literal with user inputSequelize.literal(userInput) or Sequelize.fn('CONCAT', userInput, 'x') interpolates raw SQL. When the literal contains user data, the resulting WHERE clause is vulnerable to SQL injection.
- fetch() targeting localhost / loopback / link-localfetch("http://127.0.0.1:8080/..."), fetch("http://[::1]:..."), or fetch("http://169.254.169.254/...") target loopback or cloud metadata endpoints. When the URL is even partially user-controlled, the request can be redirected to internal services.
- fetch() URL built from user inputfetch(req.query.url) or fetch(`https://api.example.com/${userPath}`) lets attackers redirect the request to internal hosts (http://localhost, http://169.254.169.254) or arbitrary external services.
- axios.get with user-controlled URLaxios.get(req.body.url) or axios({ url: `https://api/${userId}` }) issues HTTP from the server with attacker-controlled destinations, enabling SSRF and credential theft from metadata endpoints.
- got / node-fetch / undici with user URLgot(req.query.url), undici.fetch(userUrl), or node-fetch(requestUrl) perform HTTP from the server process. Without URL allowlisting, attackers route requests to internal infrastructure.
- window.location.href = userInputAssigning window.location.href to a user-supplied URL performs a top-level navigation to the attacker-chosen host, enabling phishing and credential theft via open redirect.
- location.replace(userInput)location.replace(userUrl) navigates the current page to the attacker-supplied URL while removing the original entry from history. The open-redirect impact is identical to window.location but harder for the victim to back out of.
- top.location / parent.location assignmenttop.location = userInput or parent.location.href = userInput navigates the top-most frame from inside an iframe. When the URL is attacker-controlled, it enables clickjacking-aided redirects and breaks frame-busting controls.
- deep-extend / deepmerge prototype pollutionLodash's _.merge and _.mergeWith, jQuery's $.extend(true, ...), and libraries such as deep-extend recursively copy enumerable keys. When the source contains __proto__, constructor.prototype, or prototype, the copy writes to Object.prototype.
- Lodash _.merge / _.defaultsDeep prototype pollution_.merge(target, userInput) and _.defaultsDeep(target, userInput) recursively copy properties from user input. Before Lodash 4.17.12 the copy wrote through __proto__, allowing attackers to set arbitrary properties on Object.prototype.
- Custom recursive merge prototype pollutionHand-rolled recursive merge functions that iterate Object.keys(source) and recurse into nested values will write through __proto__ and pollute Object.prototype when the source is attacker-controlled.
- HS256 signed with weak or hardcoded secretjwt.sign(payload, 'secret') or jwt.sign(payload, process.env.JWT_SECRET) where JWT_SECRET is a short, low-entropy string enables offline brute-force of the HMAC key.
- Auth tokens stored in localStoragelocalStorage.setItem('token', jwt) makes the JWT accessible to any script that runs in the same origin. A single XSS payload can exfiltrate it via fetch.
- SameSite=None cookie on HTTP pageCookies set with SameSite=None but without the Secure flag are rejected by browsers, but client-side code can still emit them on HTTP origins. The cookie then flows cross-site over insecure transports.
- target=_blank with javascript: hrefAnchor patterns like <a target="_blank" href="javascript:..."> combine reverse tabnabbing risk with javascript: URL execution. Even with noopener, javascript: still runs in the new tab.
- Non-constant-time signature comparisonif (providedSig === storedSig) compares HMACs or tokens with JavaScript ===, which short-circuits on the first differing byte. Attackers measure timing to recover the signature byte-by-byte.
- HMAC verification with === operatorif (hmac(secret, msg) === providedTag) uses == / === to compare authentication tags. JavaScript string comparison is not constant time and leaks the prefix of a correct tag.
- S3 upload without ACL restrictions3.upload({ Bucket, Key, Body, ACL: 'public-read' }) or PutObjectCommand with explicit public ACLs creates world-readable objects. Worse, buckets without Block Public Access can leak every object.
- Azure Blob upload with container public accessAzure blob uploads that set container access level to 'blob' or 'container' make every object publicly listable. Anonymous enumeration of the container then leaks all uploaded files.
- Weak cryptography protecting secrets and tokensThe code uses deprecated or broken cryptographic algorithms (MD5, SHA1, DES, RC4) that are no longer considered secure.
- Server-Side Request Forgery (SSRF) indicatorsCode fetches URLs that may be derived from user-controlled input, potentially enabling SSRF attacks.
- XML external entity (XXE) riskXML is being parsed without explicit external entity restrictions.
- LDAP injection indicatorsLDAP filter strings may be constructed from user input without proper escaping.
- Default credentials may be in useVendor default usernames or passwords detected in configuration or source.
- Hard-coded secret in source (elevated-risk key)A real server-side credential (legacy Firebase Cloud Messaging server key, HuggingFace write token, or Replicate API token) is embedded directly in the source code. Unlike the critical tier, abuse is bounded to a single third-party service rather than full account or infrastructure takeover.
Medium28 checks
- Potential Prototype Pollution Sinks DetectedVulnerable library functions that could allow modification of Object.prototype.
- eval() Usage in Inline ScriptsDirect eval() calls found in inline scripts.
- innerHTML DOM XSS SinkMultiple innerHTML assignments detected.
- outerHTML DOM XSS SinkouterHTML assignment detected.
- insertAdjacentHTML DOM SinkinsertAdjacentHTML() usage detected.
- Unsafe setAttribute UsagesetAttribute used with event handlers or URL attributes.
- Command Injection Parameter NamesCommand-related parameter names detected.
- setTimeout/setInterval with StringTimer functions with string argument.
- Sensitive Data in localStorageSensitive data patterns being stored in localStorage.
- Tokens in sessionStorageAuthentication tokens stored in sessionStorage.
- Data Storage in window.namewindow.name used for data storage.
- Object.assign source from user inputObject.assign(target, userInput) with a user-supplied source (the second argument) copies every enumerable key from userInput onto target, including __proto__ or unexpected fields the caller never intended to accept.
- document.cookie write missing HttpOnlydocument.cookie = 'sid=...'; sets a cookie without HttpOnly, allowing JS access.
- document.cookie write missing Secure flagCookies set via document.cookie without Secure can be sent over HTTP.
- window.open() without noopenerwindow.open(url, '_blank') without 'noopener' lets the new tab navigate the source page.
- localStorage storing PIIlocalStorage is not encrypted and is readable by any JS that runs in the same origin.
- React ref + innerHTMLSetting element.innerHTML via a ref after hydration bypasses React's rendering.
- Angular interpolation bypassAngularJS (1.x) template injection: user-controlled values rendered via {{ }} or ng-bind-html-unsafe are XSS sinks.
- DOMParser.parseFromString user HTMLnew DOMParser().parseFromString(userInput, 'text/html') parses arbitrary HTML into a Document. Subsequent node import via adoptNode or document.importNode preserves <script> elements, which can execute when reattached.
- MongoDB $regex from user inputBuilding a MongoDB query with { field: { $regex: userInput } } or new RegExp(userInput) lets attackers supply patterns that match every document (.*) or trigger catastrophic backtracking, leaking data or causing DoS.
- XMLHttpRequest URL from user inputxhr.open("GET", userInput) or fetch via XHR with a user-supplied URL allows attackers to drive requests to arbitrary hosts when called server-side (e.g. in Node + jsdom or in service workers).
- Object.assign with __proto__ keyObject.assign(target, JSON.parse(userInput)) or spread {...userInput} into a target object copies a __proto__ key literally; combined with a subsequent access, this can pollute Object.prototype in engines that honor the assignment.
- No Trusted Types policy createdPages that write to innerHTML, document.write, or eval without first creating a trustedTypes policy leave every string-to-DOM sink undefended. Trusted Types forces a sanitizing policy to gate these sinks.
- No Content-Security-Policy enforces Trusted TypesPages that render user-controlled HTML but lack both a Trusted Types policy and the CSP directive to enforce it leave classic DOM XSS vectors undefended.
- Cookie written without Secure flag on HTTPdocument.cookie = 'sid=' + token without '; Secure' allows the cookie to be transmitted over HTTP. Network observers and downgrade attackers can read or replay it.
- Missing X-Frame-Options / frame-ancestors CSPPages without X-Frame-Options: DENY (or a CSP frame-ancestors 'none') can be embedded inside an attacker-controlled iframe, enabling clickjacking against authenticated users.
- Hard-coded secret in source (client-exposed key)A Discord webhook URL, Sentry DSN, or Mapbox public token is embedded in the source. These formats are designed by their vendors to be used from client-side code and are secured through restrictions (URL allowlists, write-only scopes) rather than secrecy, so presence alone is expected, not a leak.
- postMessage with wildcard targetOriginpostMessage() is called with "*" as the targetOrigin, sending the message to any origin.
Low10 checks
- IndexedDB Storing Sensitive DataIndexedDB usage with potentially sensitive data.
- Console Logging in ProductionExtensive console.log statements detected.
- Debugger Statement in CodeJavaScript debugger statement found.
- fetch() call without credentials modefetch(url, { credentials: 'omit' }) prevents cookies from being sent, but auth tokens via cookies won't work.
- Spread into globalsSpreading user input into a globals object can leak fields like __proto__.
- document.cookie write missing SameSiteCookies without SameSite are sent on cross-site requests (CSRF).
- jQuery global event handler$(document).on('click', sel, fn) can be triggered by an attacker-controlled selector.
- Service worker registered without CSPService workers can intercept any request on the same origin. CSP without worker-src / script-src leaves them open.
- jQuery cookie plugin usagejQuery.cookie() sets cookies via JS and bypasses HttpOnly-equivalent protections.
- Hard-coded secret in source (low-risk identifier)A Firebase Realtime Database URL is present in the source. This is a hostname, not a credential: it contains no key or token material.
Info9 checks
- Service Worker RegistrationService worker registration detected.
- Push Notification API UsagePush API/notifications usage detected.
- Payment Request API UsagePayment Request API detected.
- Credential Management API UsageCredential Management API detected.
- WebAuthn/Passkey ImplementationWebAuthn API usage detected.
- SubtleCrypto API UsageWeb Crypto API usage detected.
- WebAssembly Usage DetectedWebAssembly modules detected.
- axios.defaults.baseURL set to dev serverHard-coded axios.defaults.baseURL = 'http://localhost:3000' will leak into production builds.
- Stripe publishable key exposedStripe publishable keys (pk_live_*) are designed to be client-side. Not a secret.
About the Code checks
- What does the Code category check?
- Read the JavaScript a page ships for dangerous inline patterns, known-vulnerable library versions, and tokens that were left in the bundle. Inline JS patterns, vulnerable library versions, leaked tokens.
- How many code checks are there?
- VulnRadar runs 120 checks in this category, ranging across critical, high, medium, low, info severity.
- Do I need to install anything to run the code checks?
- No. Paste a URL in the browser or call the REST API, and the scan itself runs from our servers against that URL. There is no agent and no appliance to deploy alongside your application. A browser extension exists if you want to scan the page you are looking at, but nothing has to be installed to use this.
Run the code checks on your site
VulnRadar runs all 120 of these against a URL in seconds, with the evidence and fix for every finding. No agent to install, just paste a URL.