Skip to contentLockpick
How it worksPricingDocs

Read

  • BlogPlain answers to common security questions
  • GuidesStep by step fixes for common setups
  • Security checksEvery check we run, explained

Learn

  • Learn with PickTwo-minute lessons on how sites get attacked
  • Lockpick for ClaudeCheck sites from Claude and other assistants
  • GlossaryThe words we use, in plain words

Company

  • ChangelogWhat changed, newest first
  • StatusWhether scans are running right now
  • Security and trustHow we check and what we never do
Sign inCheck it
Checks

Does your browser code mix untrusted input with risky methods?

By Mark KashefPublished October 8, 2026

This check flags a script that both reads input a visitor or another page controls, such as the address or a message from another window, and calls methods that insert or run content. It is a review lead.

What does this check look at?

It looks at whether a sampled script both reads input a visitor or another page controls and calls methods that insert or run content. When the two meet without the right encoding, the result is cross-site scripting. MDN describes it as tricking the target site into executing malicious code within its own context.

Pulse and Deep scans both run it.

Curious what your site shows from outside? The quick check is free and needs no account.

Check it

What does a result mean?

What the report showsWhat it meansWhat to do
Info findingA sampled script contains both an input and a risky method.Trace whether the input reaches the method without encoding.

It is a lead for code review, and no data flow or cross-site scripting is shown. The two may be unrelated or already handled safely. A clean result means nothing was found in what the scan read. It does not prove the problem is absent from parts the scan never sees.

How serious is a finding?

This is information only. It claims no weakness, so it carries no verdict, and you decide whether anything should change. Confidence starts at medium, because it rests on a pattern in your content. The report lists what to fix by how directly someone could use it, not by the severity label.

Which standards does it relate to?

StandardReference
OWASP Top TenA05:2025 Injection
CWECWE-79
ASVSv5.0.0-1.2.1

Each one is a related control, not a verification. A scan sees what anyone online can see, so it never proves a whole requirement is met.

Fix it with your AI

This needs a careful read of the code, which is a good job for an AI with your repository open.

Fix prompt for any coding agent
Review my front-end code for DOM cross-site scripting. Find every place that reads location (hash, search, href), document.referrer or postMessage data, and trace whether that value can reach innerHTML, outerHTML, insertAdjacentHTML, document.write, eval, new Function, setTimeout with a string, or dangerouslySetInnerHTML. For each path, tell me if it is safe and why, and fix the unsafe ones with textContent, proper encoding or a sanitizer. Check postMessage handlers verify event.origin.

How to check

Say Atlas, our example app at atlas.example, reads a search term from the address and shows it with innerHTML. The check flags the script, and the fix switches to textContent.

Run a Pulse scan from your Lockpick account to see it for your site. Pulse or Deep explains what each scan reads, and the full list of checks shows the rest.

Questions people ask

Does this finding mean my site has cross-site scripting?

No. It means one script contains both halves of the pattern. Whether data flows from one to the other needs a code review.

Will a Content Security Policy help here?

Yes, as a second barrier. A strict policy can stop injected script from running even if a bug slips through.

See what your site shows from outside

A quick check reads your homepage the way a visitor would and gives you a score. No account needed.

Check your site

Related pages

  • Does your site send a Content Security Policy?
  • Does your Content Security Policy also lock down plugins, base and forms?
  • Can anyone download readable source code for your site?

Sources

  1. Cross-site scripting (XSS) MDN Web Docs, read on October 7, 2026
  2. How we rate findings Lockpick docs, read on October 7, 2026

About the author

Mark Kashef, Founder of Lockpick

I'm Mark, and I build Lockpick. I write these pages, and each one is checked against its sources before it goes live. The Updated date changes only when the page itself does.

Lockpick
PricingMethodologyDocsBlogGuidesSecurity checksLearn with PickSecurity and trustLockpick for ClaudeChangelogStatusFacts for AI assistants

Lockpick is a security scanner for vibe-coded apps. It checks what your live site exposes and what a GitHub repo or AI skill would do before you install it, then gives you a fix prompt for Lovable, Bolt, Replit, Cursor or Claude Code.

Lockpick assesses public pages you are authorized to test, and public GitHub code it never runs.

© 2026 LockpickTermsPrivacyContactSign in