top of page

Securing Internal AI: Keeping Your On-Prem LLM From Becoming a New Attack Surface

  • Writer: Andrew Kirch
    Andrew Kirch
  • Dec 11, 2025
  • 11 min read


are the major LLM's eating your company's most sensitive data?

For what it's worth, I am still not an AI thought leader or evangelist, and I don't plan to undergo the lobotomy required to become one. As of this writing, there are far too many people on LinkedIN, and in business publications, and in our media who have no idea what AI is, or how it works who hope that if they talk about it enough they will be mistaken by those who also don't know what it is or how it works for thought leaders, and they might pick up a lucrative job as a prompt engineer. Please take this as a word of caution to believe less than half of what you see about AI.

From an IT manager or director’s chair, the AI story is simpler than the hype suggests. Your staff are already using AI to get work done. Leadership is starting to ask about “our AI strategy.” At the same time, it is becoming clear that for many companies, sending sensitive data to external AI services is simply too risky to defend.

This article is about what happens at that point. It is not a build guide. It is about the cybersecurity work you need to do as an internal AI is being designed, deployed and operated, so that the system you stand up to keep data safe actually keeps data safe.

Why not external AI for your sensitive data

Before talking about securing internal AI, it is worth asking why you should not simply rely on external, hosted models and call it a day. Public tools like ChatGPT, Gemini and Copilot are powerful, easy to access and constantly improving.

The problem is where your data goes. When an employee pastes source code, contracts, financials, proprietary information, trade secrets, or customer records into a third-party AI, that information leaves your environment and lands in someone else’s. It can end up in logs, telemetry, backups and training pipelines you do not control. You cannot audit who saw it, where it is stored or how long it will be kept. The Samsung incident made this concrete: engineers pasted proprietary Samsung source code and internal hardware details into ChatGPT to get help debugging. OpenAI's privacy policy now allows this data to be used to train ChatGPT. In response Samsung has banned use of the service.

On top of that, the major AI companies are still arguing in court about what boundaries they must respect around other people’s intellectual property. The New York Times has sued OpenAI and Microsoft over the use of its articles to train GPT models. Programmers have filed class actions over code being reproduced without honoring open-source licenses. News organizations and authors around the world have launched similar suits against multiple AI providers. Whatever your view of these cases, they make one thing clear: the industry has not yet settled on a conservative, universally accepted standard for handling other people’s IP.

That track record should make you cautious about handing over your own trade secrets, customer data, and internal strategy. If companies are willing to scrape and train on third-party content until a judge tells them to stop, you should assume your data will be treated with the same level of restraint (none whatsoever) unless you have very strong, negotiated guarantees, the ability to verify them, and the funding to engage in decade-long litigation.

In that context, an HR policy that forbids employees from sending sensitive company data to external AI services is necessary. It sets expectations and gives you something to point to when you say, “No, you may not paste that contract into your personal ChatGPT account.” But policy is not enough. Employees are in a competitive environment, and by nature will do what they have to to get ahead, even if that means bending a few rules.  By the time you discover that someone ignored your well meaning HR policy, the data is gone. The realistic position is: external AI may be acceptable for truly public material and experiments, but it is not an acceptable home for your crown jewels, and your employees often don't know the difference.

Once you accept that, the path points inward. If you want AI to work with sensitive data, it needs to be inside your security boundary, not outside it. And the moment you bring it inside, you are running a security project, with risks and an attack surface.

Internal AI is a security project first

Bringing AI on-prem reduces the obvious risk of data walking directly into someone else’s cloud. It lets you put usage back under your own logging, access controls and retention rules.

But the second you run a model on your own hardware and connect it to your own systems, you have created a new, high-value platform. It is a system that can see across many parts of your environment and answer detailed questions about what it finds. If you let it call other internal services, it can also take actions. That makes it attractive to attackers who already have a foothold to extract troves of your most sensitive data which they will then sell or ransom back to you.

The right way to think about an internal LLM is as a confidential, business-critical application that you own for its entire lifecycle. Its prompts and responses are as sensitive as the documents it reads. Its servers are as interesting, or more so, to an attacker as your databases and authentication systems. If you treat it as a side project, it can bite you. If you treat it as a security project with an AI component, you have a chance to make it a strength instead.

Bringing AI inside your walls: what security should be thinking about

As your team stands up a language model on servers you control, the security questions should start immediately.

The first set of concerns is about who can talk to the system and what they can see through it. If you allow the AI to read across all file shares, wikis and ticketing systems, then any account that can query it has a very efficient way to perform reconnaissance.  A compromised user or service could simply ask the model to summarize everything it knows about your production network, your contracts or your security controls.  A normal employee, could also be given information they should not have access to unexpectedly.  The output to the query "tell me who's going to get laid off next week" could result in a monumental lawsuit if the LLM starts providing sensitive HR information.

You want the AI’s view of the world to be narrower than that. Access controls need to ensure that what the model can retrieve on behalf of a user matches what that user could have opened directly in existing tools. The retrieval layer should be enforcing your directory groups and ACLs, not bypassing them in the name of convenience. From a security perspective, the rule is simple: if someone does not have rights to see it, the AI should not reveal it to them.

The second set of concerns is about the platform itself. A model server is a complex stack of runtimes, libraries and orchestration. If an attacker manages lateral movement onto that box, you do not want them to find a wide-open environment where they can escalate privileges, tamper with the model or use its integrations for further discovery. Hardening here looks familiar: isolation of backend systems from general user networks, minimal services exposed, patched dependencies and clear separation between administrative and normal access. The goal is to ensure that the AI platform is not the easiest next hop once someone gets past the first line of defense.

The third set of concerns involves the APIs and sessions that surround the AI. As soon as you expose a web interface, a chat bot or an API for other systems to call, you introduce tokens, cookies and client secrets. Those credentials are effectively keys that let someone speak with the AI and ask it to act on their behalf. They need to be stored in proper secret stores, rotated regularly, scoped to the smallest necessary permissions and monitored. A stolen bot token or long-lived session cookie should not act as an unbounded skeleton key.

Throughout all of this, logging underpins your ability to notice when something is wrong. The AI stack will generate prompts and responses that may contain sensitive content, so you cannot simply dump everything into an unmanaged external service. At the same time, you need visibility into who is using the system, which data sources they are touching and how the platform is behaving. Balancing those two needs, privacy and observability, is part of the security design, not an afterthought.

Model choice and supply-chain risk

When you choose a base model, you are making a supply-chain decision as much as a technical one. With open-weights models, especially formats like gguf downloaded from a site such as Hugging Face and run entirely on your own hardware, the security questions are about provenance and integrity, not where an API endpoint lives.

You want to be confident that the weights you are running are the ones you think you are running, that they come from the official project or organization, and that they have not been tampered with in transit. For Qwen, DeepSeek or any other model, that means pulling from the official account or a trusted mirror, verifying hashes and signatures where they are provided, and treating any helpful repackaging from random users with the same caution you would apply to an unofficial OS image. The fact that the original team is in the United States, or China does not change that basic supply-chain discipline.

Running these models locally does change the risk profile compared to calling an external API. If you are not sending prompts or data back to a third-party service, you are not handing them your trade secrets in real time. Your data stays inside your boundary unless some other piece of the stack is phoning home. The focus shifts to the runtime and glue code: the components that load the gguf file, expose an API and integrate with your systems. Those pieces need the same vulnerability management, patching and hardening you apply elsewhere, because a bug there can give an attacker control of the host even if the weights themselves are harmless.

The legal and geopolitical questions around Chinese companies and national-security law still matter, but in a different way. If you are not sending data back to a provider in China, the immediate concern is not whether your prompts end up on a server in another jurisdiction, but what your long-term dependence on this upstream looks like, and how you will respond if regulators decide they no longer like that dependency. That is a strategic risk and a governance question, not an urgent data-exfiltration problem.

What does not change is this: hosted APIs from any provider, including the same vendors that publish open weights, put you back in the external AI world where your data leaves your environment and lands under someone else’s legal system and logging. This article is about the self-hosted case. In that case, model choice is mainly about trusting your sources, validating what you download, keeping the runtime patched and understanding the licensing and IP implications before you build your business processes on top of it.

Securing the internal ai model servers

Once you have chosen a model and a runtime, the hosts that run them should be treated like any other high-value application servers. Being on-prem and behind the firewall and protected by management and orchestration is not a security control on its own. Assume that at some point, an attacker will obtain a foothold inside your network and go looking for interesting targets. A server that holds an index of your internal documents and accepts natural-language commands is very interesting.

Hardening here means reducing attack surface. Operating systems should be locked down to the services that are strictly required. Management interfaces should sit on dedicated admin networks or bastion hosts, not be reachable from general user subnets. Service accounts used by the AI stack should have only the permissions they actually need – no more. Where you use containers or orchestration, you should avoid giving them privileges that would let an escape turn into a full system compromise.

Monitoring matters just as much. AI workloads can be noisy in terms of CPU, GPU, memory and network use. You still need baselines and alerts that can distinguish a big batch of legitimate queries from someone using this box to exfiltrate data or an attacker who has dropped their own tools onto the server. The AI platform should be integrated into your existing logging, SIEM and incident-response processes, not left as an opaque island.

Preserving need-to-know when the internal AI can see across systems

The biggest change internal AI introduces is how easy it becomes to ask cross-cutting questions. In a traditional environment, an attacker or a curious insider has to know which system to target: the HR database, the finance share, the code repository. An AI that is wired into many of those at once can answer questions that span them without exposing the underlying complexity.

From a security perspective, you have to assume that any data the AI can reach may be described, summarized or recombined in its answers. That is why strict alignment with your existing Identity and Access Management (IAM) is so important. If your finance documents are limited to the finance group, the retrieval logic should enforce that before the model ever sees those documents. If HR files are restricted to HR, the AI should not be able to quote from them on behalf of someone in marketing.

In practice, securing this often means starting small. You begin with lower-risk, broadly shared material: internal FAQs, product documentation, policy manuals, process descriptions. You verify that your access-control integration behaves as expected. Only then do you consider bringing in more sensitive data, and even then you may decide that some categories – such as detailed HR investigations or active legal matters – do not belong in the AI system at all. The aim is not to make the AI all-knowing; it is to make sure it does not erode need-to-know in silence.

Interfaces, bots and APIs: avoiding new skeleton keys

Success will attract integrations. Once people see value from a web interface, they will want a bot in Teams or Slack, an API for scripts, perhaps an assistant inside the ticketing system. Each integration is useful to the business, and each creates a new handle an attacker can grab.

Every bot token, client ID and API key associated with the AI platform should be treated as a high-value secret. They should live in proper secret-management systems, not in source code or shared documents. Their permissions should be scoped as narrowly as possible, and their usage should be logged. If a token that is supposed to be used only by a help-desk integration suddenly starts issuing queries at odd hours from unfamiliar IP addresses, you want that to stand out.

The design of the AI endpoints also matters. If you allow prompts to trigger actions – running scripts, talking to production databases, opening tickets – you should have clear guardrails around what can be done in one step and what requires human confirmation. You should also have limits on how much data a single session can retrieve, how long sessions last and how often re-authentication is required. These are the same principles you would apply to any powerful internal tool; AI does not change them, it just makes it easier to hide dangerous behavior behind natural language.

Operating the AI stack over its life

Security does not end when the system goes live. Models will be updated, frameworks will release patches, new vulnerabilities will be discovered in the open-source components you depend on. You need a way to test these changes, roll them out safely and roll back if necessary without losing visibility into what happened when.

Logs and telemetry sit at the center of this. You must capture enough information to investigate incidents and tune defenses, while recognizing that prompts and responses may contain sensitive content. That typically means separating metadata – who queried what service, when, and against which data sources – from full payloads, and carefully limiting where those payloads are stored and who can see them. It also means deciding in advance how long you keep that data, how it is protected, and how it is destroyed when no longer needed.

At some point, you will retire or replace the system. That is part of the lifecycle as well. Old snapshots, leftover volumes and forgotten test instances can all contain exactly the kind of material you built the internal AI to handle. A secure decommissioning plan is not glamorous, but it belongs in the same conversation as the first proof-of-concept.

Calm, secure AI instead of exciting new risk

You do not need to chase every model release or call yourself an AI visionary. What you do need, if you are responsible for IT and security in a small or mid-sized business, is to make sure the internal AI your organization builds does not become its softest target.

That starts with recognizing that external AI is not an acceptable place to send sensitive data, no matter how convenient the interface. It continues with treating internal AI as a security project from the first design meeting: aligning it with your existing access controls, hardening the servers and runtimes, protecting tokens and sessions, and treating model choice and integrations as part of your supply chain and legal risk, not just engineering.

Done that way, your internal AI can be useful and fairly boring: a well-secured system that helps your people work more quickly, without creating new and exciting ways to lose control of what matters most. That is the right kind of AI for a business that cares more about resilience than buzzwords.

bottom of page