Skip to main content
HighHost validationOWASP A01:2021CWE-601

How to fix: Confirmed Open Redirect via Meta Refresh

The scanned URL contained a redirect-style query parameter with an absolute external URL value, and the page's own HTML contains a <meta http-equiv="refresh"> tag whose target matches that same external host. Unlike a server-issued 3xx, this redirect is rendered directly into the page body, so it fires even on a 200 OK response.

Why it matters

Same phishing impact as a server-side open redirect: a link on your trusted domain silently forwards the visitor's browser to an attacker-controlled page. Meta-refresh redirects are also commonly missed by security reviews that only check for 3xx Location headers.

The check parses the actual <meta refresh> tag content and the actual request query string for the same scanned URL, then compares hostnames: it only fires when both point at the same external, non-organizational domain. A doc/tutorial page rendering this HTML as literal example text inside <pre>/<code> is excluded.

How to fix it

  1. 1Never build a meta-refresh URL directly from a request parameter.
  2. 2Validate the destination against an allowlist before rendering the refresh tag, same as any server-side redirect.
  3. 3Prefer a real HTTP redirect (3xx with a validated Location) over meta-refresh for anything security-sensitive.
  4. 4Reject parameter values starting with http://, https://, or // unless explicitly allowlisted.

Code examples

Validate before rendering a refresh redirect

TypeScript
const ALLOWED_HOSTS = new Set(['yourdomain.com']);

function metaRefreshTarget(next: string): string {
  if (next.startsWith('/')) return next;
  try {
    const parsed = new URL(next);
    if (ALLOWED_HOSTS.has(parsed.hostname)) return parsed.href;
  } catch {}
  return '/';
}
// <meta http-equiv="refresh" content={`0;url=${metaRefreshTarget(next)}`} />

References

Detected automatically by VulnRadar. The check id is open-redirect-meta-refresh-confirmed, stable across every scan so you can filter or diff on it.

See every host validation check

Questions

How severe is Confirmed Open Redirect via Meta Refresh?
VulnRadar rates this high severity in the host validation category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id open-redirect-meta-refresh-confirmed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Confirmed Open Redirect via Meta Refresh map to?
It maps to CWE-601. In the OWASP Top 10 it falls under A01:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for confirmed open redirect via meta refresh

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Confirmed Open Redirect via Meta Refresh fix | VulnRadar