Join our Newsletter — 33% off our NHI Course
Home› Guides› Securing Unstructured Data for GenAI: Documents, Images, Audio…
Guide Data Security

Securing Unstructured Data for GenAI: Documents, Images, Audio and Video

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

Generative AI turns years of loosely governed documents, scans, call recordings and meeting videos into searchable, quotable context, so every permission mistake and every forgotten file becomes something an assistant can surface in seconds. Structured data security grew up around databases with schemas, owners and column-level controls; unstructured content rarely has any of these, yet it is most of what retrieval-augmented generation (RAG) pipelines and enterprise assistants ingest. This guide covers the controls specific to unstructured data feeding GenAI: discovery and classification across modalities, permission inheritance into retrieval, redaction for text, images, audio and video, treating embeddings as sensitive data, and making deletion reach every derived copy. It is written for data security teams and AI engineers who build or approve ingestion pipelines. For the full catalogue of GenAI data-layer risks, see the GenAI Data Security Risks and Mitigations Guide.

Key takeaways

  • Assistants inherit your oversharing. Microsoft, for example, states that Microsoft 365 Copilot only surfaces data a user has at least view permission to, which means any file shared too widely is now one question away.
  • Every modality hides text. Images carry text in pixels and metadata, audio carries spoken names and card numbers, and video carries both; redaction has to extract that text before it can protect it.
  • Embeddings are not anonymous. Research by Morris and colleagues recovered 92% of 32-token inputs exactly from text embeddings and recovered full names from clinical notes, so vector stores need the same classification as their source.
  • Permissions must travel with the chunk. OWASP LLM08:2025 calls for permission-aware vector stores and strict partitioning, which only works if source ACLs are copied into chunk metadata at ingestion and re-synced when they change.
  • Deletion is a lineage problem. Removing a source file does nothing to its chunks, embeddings, caches, transcripts and logs unless the pipeline tracks every derivative by source ID.

Why unstructured data is different

Unstructured content lacks the three things structured controls depend on: a schema that says where sensitive fields are, a single owner, and an access model designed in advance. It also multiplies during GenAI ingestion. A single scanned contract can become extracted text, OCR output, a dozen chunks, a dozen embeddings, a cached summary and a line in a prompt log. NIST AI 600-1, the Generative AI Profile, lists data privacy as one of its twelve GAI risks, covering leakage and unauthorised use, disclosure or de-anonymisation of personal or sensitive information, and notes that models may leak, generate or infer sensitive information about individuals.

Modality risk table

ModalityWhere sensitive data hidesGenAI-specific riskPrimary controls
Documents (Office, PDF, email)Body text, comments, tracked changes, hidden text, embedded objects, file propertiesOvershared files retrieved for users who should not see them; hidden text carrying instructions (OWASP LLM08 gives a hidden-text CV example)Permission sync to chunks, format-aware extraction that flags hidden content, label-aware ingestion
Images and scansText in pixels (IDs, screenshots, whiteboards), EXIF location and device data, facesOCR or multimodal models make previously unsearchable text retrievable; image-borne prompt injection (OWASP LLM01 scenario)OCR before classification, metadata stripping, pixel redaction, face handling policy
Medical images (DICOM)Burned-in annotations and header metadataPatient identifiers in both pixels and headersSeparate pixel and header de-identification; Microsoft's Presidio DICOM redactor, for instance, notes it does not scrub metadata
Audio (calls, voice notes)Spoken names, account and card numbers, health details; the voice itselfTranscripts become searchable text; voice samples enable cloningTranscribe then classify, redact transcript and audio segments, restrict raw audio retention
Video (meetings, CCTV, training)Audio track, on-screen documents and screen shares, facesMeeting recordings expose content shared on screen to everyone the recording is shared withCombine audio and frame text extraction, sharing defaults for recordings, short retention

Discovery and classification

You cannot gate ingestion on sensitivity until you know what the content is. For unstructured data that means classifying the extracted text of every modality, not the file name or extension. See the Data Classification Guide and Data Security Posture Management (DSPM).

  • Extract first: run OCR on images and scans, speech-to-text on audio and video, and full-fidelity extraction on documents (including comments and hidden text) before classification. A scanner that skips images misses screenshots of credentials and ID documents.
  • Classify the source, inherit to derivatives: chunks, embeddings, transcripts and summaries take the highest label of their source. Do not let a derived artefact be downgraded silently.
  • Scope by repository, not by enterprise: decide which sites, shares, mailboxes and recording libraries are in scope for each GenAI use case. An inventory of approved sources is easier to defend than a blocklist. NIST CSF 2.0 ID.AM-07 expects inventories of data and its metadata for designated data types.
  • Find stale and orphaned content: files with no active owner, old project sites and departed users' drives are disproportionately overshared and should be reviewed or excluded before an assistant indexes them.
  • Look for secrets: API keys and passwords in documents and screenshots become retrievable. ATLAS AML.T0082 RAG Credential Harvesting describes adversaries using an AI system to find credentials in indexed data. See MITRE ATLAS AML.T0082 RAG Credential Harvesting.

Access control and permissions inheritance

Retrieval must enforce, at query time, the access the requesting user has to the source. There are two broad designs.

ApproachHow it worksStrengthsWeaknessesChoose when
Native platform groundingThe assistant queries the source platform's own index, which applies that platform's permissions per userPermissions stay authoritative; no copy of ACLs to driftExposes existing oversharing directly; limited to that platform's contentContent lives in one suite with mature permissions and you have cleaned up sharing
Custom RAG with ACL metadataIngestion copies source ACLs (users, groups, labels) into chunk metadata; the retriever filters by the caller's identity and groupsWorks across sources; can apply stricter rules than the sourceACLs drift unless re-synced; group expansion and nested groups are hard; service account retrieval bypasses usersMultiple repositories, or you need tighter controls than the source offers
Partitioned indexesSeparate indexes or namespaces per tenant, department or sensitivity tierStrong isolation; simple to reason aboutDuplication; coarse-grainedMulti-tenant products, regulated data, or very sensitive collections
  • Retrieve as the user, not as the pipeline: the most common failure is a RAG service querying with its own broad service identity and returning whatever it finds. Pass the end user's identity to the retriever and filter before ranking. See the Permission-Aware RAG Guide.
  • Re-sync on change: when a file's sharing is removed, the chunk metadata must change within an agreed window. Measure the lag.
  • Honour labels and encryption: Microsoft documents that Copilot honours the usage rights of content encrypted by Purview Information Protection, and that encryption can exclude programmatic access by agents. Equivalent label-aware exclusion should be built into custom pipelines.
  • Least privilege for the ingestion identity: the connector that reads every source is a high-value non-human identity. Scope it to approved repositories, store its credential in a secrets manager and monitor its use. See the RAG Security Guide.

Redaction across modalities

Redaction removes or masks sensitive elements before content is indexed, sent to a model, or returned. Decide first whether you need redaction (irreversible) or masking or tokenisation (reversible for authorised users); see Data Masking vs Data Redaction.

  • Text: entity detection for names, identifiers, card and account numbers and secrets, applied to extracted text including comments and hidden text. Pattern rules plus contextual models reduce misses.
  • Images: OCR to locate text, then redact the pixel region, and strip EXIF and other metadata separately. Microsoft's open source Presidio Image Redactor follows this OCR-based approach and is described in its docs as beta and not production ready, which is a reminder to test any tool's recall on your own samples.
  • Audio: transcribe, detect entities in the transcript with timestamps, then redact both the transcript and the corresponding audio segments. Redacting only the transcript leaves the raw recording sensitive.
  • Video: treat as audio plus image frames. Screen shares are the highest risk because they show documents the viewer may not otherwise be permitted to see.
  • Output side: apply a second check on model responses for high-risk entities. OWASP LLM02:2025 Sensitive Information Disclosure lists data sanitisation and strict access controls among its mitigations.

Ingestion pipelines and embeddings

Treat the ingestion pipeline as a data processing system with its own security requirements.

  • Validate sources: OWASP LLM08 recommends accepting data only from trusted, verified sources and using text extraction that ignores formatting and detects hidden content. This also blocks instructions hidden in documents or images. See AML.T0070 RAG Poisoning.
  • Classify embeddings as sensitive data: inversion research shows embeddings can reveal much of their source text, so encrypt vector stores at rest, restrict query access, and keep them in the same jurisdiction and retention regime as the source. OWASP lists embedding inversion among vector and embedding weaknesses.
  • Carry lineage metadata: every chunk and vector stores source ID, source version, label, ACL snapshot and ingestion time. Without a source ID you cannot delete or re-permission precisely.
  • Log retrieval: OWASP LLM08 calls for detailed immutable logs of retrieval activity. Log the user, query, chunks returned and their labels, and protect the logs at the same level as the content. See the OWASP LLM Top 10 LLM08 Vector and Embedding Weaknesses Guide.
  • Separate fine-tuning from retrieval: content in a retrieval index can be removed; content used to train or fine-tune a model may be memorised. Keep sensitive unstructured data out of training sets unless you have a clear lawful basis and a plan for removal requests. See RAG vs Fine-Tuning.

Retention and deletion

Deletion must propagate from the source to every derivative. Map each artefact and its deletion path before go-live.

ArtefactDeletion triggerMechanism
Source fileRetention policy, owner deletion, erasure requestSource platform deletion, event sent to pipeline
Extracted text, OCR output, transcriptsSource deletedDelete by source ID in intermediate storage
Chunks and embeddingsSource deleted or permissions removedDelete or update vectors by source ID metadata; verify with a retrieval test
Caches and stored summariesSource deletedInvalidate by source ID or short time-to-live
Prompt and retrieval logsLog retention periodTime-based expiry; redact at write where possible
Fine-tuned modelsErasure request affecting training dataAssess retraining or model replacement; record the decision

The UK ICO notes that complying with a request to erase training data does not entail erasing all models built on that data, but that where personal data is contained in a model, rectification or erasure may not be possible without retraining or deleting it. Retrieval stores avoid much of this difficulty, provided deletion by source ID works. See AI Data Retention and Deletion.

How to implement

  1. Scope: list the repositories each GenAI use case will ingest and name an owner for each.
  2. Clean up sharing first: remove organisation-wide and anonymous links on in-scope sites, and review stale content, before indexing. Pilot with a small group whose access you understand.
  3. Build extraction and classification: OCR and transcription in front of classification; derivatives inherit the source label.
  4. Enforce permissions in retrieval: user-context retrieval with ACL metadata or native grounding; test with accounts that should be denied.
  5. Add redaction and output checks for the entity types your policy names, measured on a labelled test set per modality.
  6. Prove deletion: delete a test document and confirm no chunk, cache or summary can be retrieved afterwards.
  7. Roll back safely: keep the ability to disable a connector or drop an index quickly if oversharing is found, and rebuild from approved sources.

Small organisations using a suite assistant should concentrate on steps 2 and 7, since native grounding handles permission enforcement; larger organisations running custom RAG need every step.

Detection and measurement

  • Permission drift lag: time between a source permission change and the matching chunk metadata update.
  • Deletion propagation time: time from source deletion to the content being unretrievable, tested monthly.
  • Denied-retrieval test pass rate: share of canary documents correctly withheld from test users without access.
  • Redaction recall per modality: share of seeded entities caught in text, image, audio and video test sets.
  • Overshared content in scope: count of in-scope files with organisation-wide or anonymous sharing, trending down before and after launch.

Framework mapping

FrameworkReferenceRelevance
OWASP LLM Top 10 2025LLM02 Sensitive Information Disclosure; LLM08 Vector and Embedding WeaknessesOutput leakage; permission-aware stores, inversion, hidden content
MITRE ATLASAML.T0064 Gather RAG-Indexed Targets; AML.T0070 RAG Poisoning; AML.T0082 RAG Credential HarvestingAdversary use of indexed unstructured content
NIST AI 600-1Data Privacy riskLeakage, inference and de-anonymisation
NIST CSF 2.0ID.AM-07, PR.AA-05, PR.DS-01Data inventory, permission management, data-at-rest protection
NIST SP 800-53 Rev 5AC-3, AC-21, SI-12, MP-6Access enforcement, information sharing, retention, sanitisation

Common failure patterns

  • Indexing before cleaning sharing: the assistant faithfully returns files that were shared with everyone years ago.
  • Service identity retrieval: the RAG service queries with its own broad credentials, so every user sees everything it can read.
  • Text-only scanning: screenshots of credentials and scanned ID documents pass classification because nobody ran OCR.
  • Transcript redacted, recording kept: the raw audio or video stays available with the original sensitive content.
  • Vectors treated as harmless: embeddings copied to a less controlled store or region on the assumption they cannot be reversed.
  • Delete that stops at the source: a removed file keeps answering questions from its chunks and cached summaries.

Practitioner checklist

  • Approve each repository for ingestion with a named owner and a sensitivity ceiling.
  • Remove organisation-wide and anonymous sharing from in-scope content before indexing.
  • Run OCR and transcription before classification; inherit source labels to every derivative.
  • Retrieve in the end user's context and test with accounts that must be denied.
  • Classify, encrypt and access-control vector stores as sensitive data.
  • Store source ID, label and ACL snapshot on every chunk and vector.
  • Redact images, audio and video segments, not just extracted text, and strip metadata.
  • Test deletion propagation and permission re-sync monthly and report the lag.
  • Log retrieval with user, query and returned chunk labels, protected like the content.

Standards and references

Related NHI Mgmt Group resources: GenAI Data Security Risks and Mitigations Guide · Permission-Aware RAG Guide · CISA AI Data Security Guidance Guide · Unstructured Data and File Share Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.