How Does an Indirect Prompt Injection Attack Occur?
Indirect prompt injection hides instructions in web pages, emails or files an AI reads, then hijacks the model. How it works, examples and defences.
From the outside and from the inside.
Outside · S4E Cloud
See what attackers see. No signup needed.
Fast scan covers a limited set of checks. Sign up for full coverage and continuous monitoring.

Inside · Openness by S4E
Open source host scanner for Linux and Windows.

Outside · S4E Cloud
Scan your site for everything an attacker could find: exposed secrets, misconfigurations, vulnerable dependencies and the full attack surface.
See external scanningInside · Openness by S4E
Openness reads the software installed on each host and matches it against vendor advisories. Run it on your own machines, on any schedule, with full control over what gets scanned and when.
See Openness| Target | Port | Name | Severity | Status | Source | Last Detected | Action | |
|---|---|---|---|---|---|---|---|---|
| demo.s4e.io | 80 | SQL Injection | Critical | Open | Manual Scan | 15 Apr 2026 23:41 | ··· | |
| demo.s4e.io | 443 | Exposed .env file | Critical | Open | Continuous Scan | 15 Apr 2026 23:40 | ··· | |
| api.demo.s4e.io | 443 | Reflected XSS | High | Re-Opened | Continuous Scan | 15 Apr 2026 23:39 | ··· | |
| demo.s4e.io | 443 | Outdated jQuery CVE-2019-11358 | High | Open | Continuous Scan | 15 Apr 2026 23:38 | ··· | |
| admin.demo.s4e.io | 80 | Directory Listing Enabled | Medium | Open | Continuous Scan | 15 Apr 2026 23:37 | ··· | |
| demo.s4e.io | 443 | Missing HSTS Header | Medium | Open | Continuous Scan | 15 Apr 2026 23:36 | ··· | |
| demo.s4e.io | 443 | Subdomain Finder Online | Informational | Open | Continuous Scan | 15 Apr 2026 23:35 | ··· |
This is what S4E.io found on a public demo domain in a few hours.
Scan your domain free →Professional-grade security scanning accessible to all from solo developers to enterprise teams. No expertise required.
Start scanning immediately. No credit card, no account, no waiting.
Open ports, CVEs, misconfigurations, and exposed credentials from the S4E check library.
Enter a domain and you're scanning in seconds. Nothing to deploy on your servers.
See your servers the way an attacker does: open ports, exposed services and the web application, in one scan.
Indirect prompt injection hides instructions in web pages, emails or files an AI reads, then hijacks the model. How it works, examples and defences.
A Create with AI example: a custom scan that detects CORS configurations reflecting any origin with credentials allowed.
A Create with AI example: a custom scan that detects private IP addresses exposed in public responses and pages.
S4E.io found a SQL injection we'd had for 8 months.
We fixed it in an afternoon.
Our pentest company missed it entirely.