A supplier invoice becomes an instruction source
An accountant asks an AI assistant to classify an invoice. The document contains text directing the assistant to export a client ledger to an external endpoint. This is a prompt-injection scenario: document contents are data for the accounting task, not a source of permission to operate connected tools. The issue is best tested at the application and tool boundary rather than by asking whether the model usually obeys its system prompt. Capture the supplied file’s identity, the authorised user task, the retrieval context and the tools available to the session. Investigators should distinguish hostile text that was merely read from a tool call that was attempted, allowed or completed.
Design the financial boundary outside the model
The assistant needs only the fields and documents required for invoice classification. Retrieval should enforce the requesting accountant’s client and matter scope before the text reaches the model. Connected tools should independently reject attempts to enumerate unrelated ledgers, alter beneficiaries or send data to an unapproved destination. A model-generated justification must not grant it broader access. Separate read-only data access from payment, export and communication tools, using distinct identities where available. If an authorised workflow requires a sensitive export, route that action through an accountable human decision and a destination allowlist enforced by the receiving service.
Reconstruct what the application actually did
Preserve the suspicious invoice in an evidence repository with appropriate client restrictions, along with the prompt version, retrieval records, tool-call arguments, API response and application identity audit. Avoid putting raw client financial data into a wide incident channel. An attempted export that receives a denial is a control success and a reason to examine the source document; it is not proof that a ledger left the environment. Conversely, a model response saying it refused the instruction does not prove the export API was never called. Check for retries, delegated actions and asynchronous jobs triggered by the same session. An explicit timeline is needed when several connected systems record events at different times.
Exercise the attack without exposing real clients
Build a fictional supplier invoice whose body includes a request to send an invented ledger to an external test address. Run it against an authorised non-production integration with deliberately scoped credentials. Confirm that the classifier still completes the permitted categorisation, while the unapproved export is blocked at the data service or egress control. Capture both results; a configuration that blocks the harmful action by disabling all classification is not an adequate fix. Repeat with the instruction hidden in an attachment, an OCR field and a retrieved reference if those are genuinely supported input paths. Do not use real client datasets as material for an adversarial prompt demonstration.
Examine the financial consequence, not only the chatbot answer
A prompted assistant might also change a supplier record, annotate an invoice incorrectly or suggest an unauthorised payment. Those outcomes need different safeguards from bulk data export. Reconcile classification output with the original invoice, and require separate, transaction-bound review for changes to beneficiaries or payment release. Assess whether the requesting employee’s client permissions are appropriate even if the tool rejected the malicious command. Where one integration token spans multiple customers, the underlying application has an authorisation flaw that prompt hardening alone cannot resolve. Accountants should see clear error messages when a safe operation is denied, without being asked to bypass the control to meet a deadline.
A useful acceptance and follow-up record
Document the tested tool versions, approved data scope, rejected destination, identities involved and whether any records were actually transferred. The practice owner must decide if the incident is a blocked injection attempt, a permissions exposure or a confirmed data event. This classification determines whether privacy assessment or client notification is considered; an AI-specific label does not replace evidence. Assign a person to review connector permissions whenever the assistant gains another tool, because the risk can change without any change to the model. Retest after document-parsing updates and supplier integrations. The lasting safeguard is a financial system that enforces client and transaction authority even when an assistant confidently requests something outside its task.
Make connector changes a security release
AI assistants often acquire additional reach when a new document repository, email integration or workflow action is enabled. The practice should treat that connection as a change to its authority model, not a cosmetic feature update. Before enabling a new connector, identify the user population, client scopes, accessible operations, egress destinations and audit records available. Require a test in which an invoice from one fictional client refers to another client’s records; the assistant must not retrieve them merely because the text contains a plausible reference. A second test should verify that a legitimate user can process their own invoice without asking for an elevated role.
Retain versioned tool-permission settings so a later investigator can tell which destinations were permitted at the time of an event. Training staff to ignore suspicious instructions is helpful but cannot replace server-side denial when untrusted document text reaches a connected model. If a vendor changes the way tools are invoked or credentials are passed, rerun the negative tests before broad rollout. The decisive property is not model obedience but the enforceable separation between untrusted content, financial authority and client confidentiality.
Related perspective: The invoice example tests untrusted document text attempting to trigger a connected AI tool; the companion financial-workflow guide defines broader data permissions and safe tool-use boundaries. Prompt Injection in Financial Workflows: Contain AI Tool Permissions.
Sources and further reading
- NIST, AI Risk Management Framework 1.0
- ASD and partners, Principles of operational technology cyber security
- NIST, Cybersecurity Framework 2.0
Strengthen your security with Next Defence
Next Defence helps accounting and financial advisory organisations assess security risks around invoice-reading agent. We can test whether a model treats hostile document content as permission to call a write-capable finance API or disclose client files, review the identity and application controls involved, and establish evidence-led response improvements that protect client confidentiality and properly approved financial actions. Explore our AI Security & Governance services to turn these findings into practical, verified safeguards.