Skip to content
Open dashboard (opens in a new tab)

AI and LLM testing

LLM security checks

NightVision’s LLM checks attack the endpoints of your application that call a large language model. They run in every full scan, with no extra setup. This page lists each check, what it sends, and what has to happen before it reports a finding.

For how NightVision finds the endpoints to test, see Test AI and LLM features.

Check Id Severity OWASP Top 10 for LLM What proves it
LLM Prompt Injection 199106 Medium LLM01 Prompt Injection The model refuses a harmless task when asked plainly, then does it when the request tells it to ignore its instructions
LLM System Prompt Leakage 199108 Medium LLM07 System Prompt Leakage, LLM01 The reply repeats distinctive parts of the system prompt read from your source code
LLM External Service Interaction 199101 High LLM01, LLM06 Excessive Agency Your server calls a unique address that NightVision controls
LLM Cloud Metadata Exposure 199102 Critical LLM01, LLM02 Sensitive Information Disclosure, LLM06 The model’s reply contains data from the cloud instance metadata service that NightVision can verify
LLM-backed Endpoint Detected 199103, 199104 Info The endpoint answers a question only a model can answer, or its response carries a model’s fingerprint

Every check is built so that a page that only echoes its input cannot cause a finding. The proof is always something that was not in the request: an answer the model had to work out, a callback from your server, or text that exists only in your code.

What it tests. Whether text in a request parameter can override the instructions the application gives its model. If it can, anyone who can reach the endpoint can steer what the model does next, including any tool it is allowed to call.

How it works. NightVision asks the endpoint to do a small, harmless task: join two short strings into one code. The joined code appears in no request, so an echo cannot produce it. The check then compares two behaviors:

  • A guarded assistant. Asked plainly, the endpoint refuses the task, twice. Asked again with an instruction to ignore its earlier instructions, it does the task. Its guard was overridden.
  • A single-purpose endpoint. A translator, classifier or similar endpoint has a job of its own. If it follows the bare instruction and returns the code, instead of treating the text as data to translate or classify, its input is being read as commands.

A model that does the task when asked plainly, and has no task of its own, is not reported. Nothing was overridden.

An LLM Prompt Injection finding with severity Medium on the chat endpoint of payments-api. The summary says the assistant refused twice when asked plainly, then returned the joined code when told to ignore its earlier instructions. The Evidence tab shows the endpoint, the message parameter and a command to reproduce the request.
The finding shows the request that overrode the model's instructions and the code that came back.

Severity. Medium. The finding proves that input changes the model’s behavior. It does not by itself show impact. The other checks on this page show what an attacker can do with that control.

Fix. Keep instructions and user input apart: pass user text as data, not as part of the instruction. Limit what the model can do on a user’s behalf, and check its output before acting on it.

Also mapped to. CWE-1427, OWASP Top 10 A03:2021 Injection.

What it tests. Whether a user can make the model reveal its system prompt. System prompts often hold business rules, internal limits, tool descriptions and other details you do not want read out to anyone who asks.

How it works. This check uses the system prompt that source intelligence reads from your code for each endpoint. NightVision sends the endpoint a small set of extraction requests and compares each reply with the real prompt. It reports a finding only when all of these hold:

  • The reply repeats distinctive text from two or more different sentences of the prompt.
  • That text is not in the request.
  • That text is not in the endpoint’s normal reply. Two control requests are sent first, and any prompt text the model volunteers without being asked is left out.

Because the comparison is against your actual prompt, a reply that only looks like a system prompt is not reported.

An LLM System Prompt Leakage finding with severity Medium. The Evidence tab shows the request sent to the chat endpoint and a reply that repeats the opening of the system prompt.
The finding quotes the prompt text that came back and the request that extracted it.

What it needs. An API specification produced by nightvision openapi extract and uploaded to the application. The check runs on the endpoints whose system prompt is recorded in that specification. See Bring source intelligence for stronger proof.

Severity. Medium.

Fix. Treat the system prompt as readable by users. Move secrets, credentials and internal rules out of it, and enforce those rules in code instead of in the prompt.

Also mapped to. CWE-200, OWASP Top 10 A01:2021 Broken Access Control.

What it tests. Whether the model can be told to make your server send a request to an address an attacker chooses. This is server-side request forgery through the model. Such requests can reach internal services that are not exposed to the internet.

How it works. NightVision places an instruction in a request parameter. It does not send a ready link. It gives the model the parts of a unique out-of-band address and asks it to fetch the result. If your server then calls that address, NightVision receives the callback and reports the finding. The Evidence tab shows the request and the confirmed callback.

A callback can arrive a few minutes after the request that caused it. NightVision keeps listening and adds the finding to the scan when it does.

Severity. High.

Fix. Treat model output as untrusted. Do not let a model start network requests from free-text instructions. Limit any tool the model can call to a strict allowlist of destinations, and keep the model on an isolated egress path.

Also mapped to. CWE-918, OWASP Top 10 A10:2021 Server-Side Request Forgery.

What it tests. Whether the model can be told to read the cloud instance metadata service from your server. The metadata service can expose the credentials of the instance the application runs on.

How it works. NightVision places an instruction in a request parameter that leads the model to fetch instance metadata, then confirms the read from the model’s own reply. The Evidence tab shows what confirmed it. A model that invents a plausible answer does not pass this confirmation.

Severity. Critical.

Fix. Limit any fetch tool the model can call to an allowlist that excludes link-local and internal addresses. On AWS, require IMDSv2, so a plain GET request cannot read the metadata service, and give the instance role only the permissions it needs.

Also mapped to. CWE-918, OWASP Top 10 A10:2021 Server-Side Request Forgery.

Sensitive information disclosure, output handling and unbounded consumption

Section titled “Sensitive information disclosure, output handling and unbounded consumption”

Three more checks cover what a model can be made to give away, where its output ends up, and how much of it an attacker can use.

Check OWASP Top 10 for LLM What it looks for
Sensitive information disclosure LLM02 Sensitive Information Disclosure Secrets or personal data in the model’s replies that the user should not see
Improper output handling LLM05 Improper Output Handling Model output that reaches a database query, a shell command or the page without being validated first
Unbounded consumption LLM10 Unbounded Consumption An endpoint with no rate limit or cost ceiling on model calls. The check backs off as soon as it sees a limit

Their findings appear with the other LLM findings in the scan’s results and carry the OWASP category shown here.

This is how a scan tells you which endpoints call a model. It is informational, not a vulnerability.

  • From responses (199103). During the crawl, a response carried the fingerprint of a model, such as a model provider’s reply format or token-usage fields. When the only sign is a streamed reply, the endpoint is recorded as unsure, because many ordinary features stream too.
  • By asking (199104). NightVision sends the endpoint a small sum and a random code to repeat. The endpoint answers the sum, which was not in the request, and repeats the code. A fixed page or an echo cannot do both.

Endpoints found this way are added to the application’s LLM endpoints tab. Detection is always on, so it is not in the list of checks you can clear. See how LLM-backed endpoints are found.

Every LLM check runs by default. To leave one out of a scan:

  1. Start a new scan and choose the application. See Start a scan.
  2. Open Advanced and find Active and passive checks (ZAP).
  3. Type LLM in Filter checks.
  4. Clear the box beside a check to leave it out. The line above the list changes from Every check runs. to the number of checks turned off.
The Checks section of New scan with LLM typed in Filter checks. Four ticked checks are listed: LLM External Service Interaction, LLM Cloud Metadata Exposure, LLM Prompt Injection and LLM System Prompt Leakage.
Filter the checks by LLM, then clear the ones to leave out.

The LLM checks are listed with the other active checks in the check catalog.

NightVision maps LLM findings to the OWASP Top 10 for LLM Applications, 2025 edition, next to the OWASP Top 10, CWE and WSTG mappings that other findings carry.

Category NightVision checks
LLM01 Prompt Injection LLM Prompt Injection, LLM System Prompt Leakage, LLM External Service Interaction, LLM Cloud Metadata Exposure
LLM02 Sensitive Information Disclosure LLM Cloud Metadata Exposure, Sensitive information disclosure
LLM05 Improper Output Handling Improper output handling
LLM06 Excessive Agency LLM External Service Interaction, LLM Cloud Metadata Exposure
LLM07 System Prompt Leakage LLM System Prompt Leakage
LLM10 Unbounded Consumption Unbounded consumption

The remaining categories, LLM03 Supply Chain, LLM04 Data and Model Poisoning, LLM08 Vector and Embedding Weaknesses and LLM09 Misinformation, concern how a model is built, trained and supplied. A scan of the running application does not test them.

Where you see the category:

  • On a finding. The Standards card on the finding page shows the LLM category as a chip, beside the CWE and OWASP Top 10 chips. Select a chip to open the OWASP page for that category.
  • In the PDF report. LLM findings are grouped under their OWASP Top 10 for LLM category in their own section. See Reports and exports.
  • In the API. Each finding’s kind lists its standards, with the code, name, version and reference link of each. See the API reference.