Case study · AI infrastructure security

Inference is a server too: securing self-hosted LLM serving for a South Korean fintech

A South Korean fintech moved its AI features from external APIs to open-weight models served on its own GPUs, to keep customer data in-house and control cost. The data science team had made it work. The security team had not yet looked. When inference engines like vLLM and SGLang started appearing in advisories and breach reports, the company treated its model servers as what they are: internet-adjacent services running complex code, with customer data passing through them.

Case studyFinancial services · South KoreaSumanta Mukhopadhyay9 min read
#security#ai#kubernetes
CASE STUDY · CASE STUDY · AI INFRASTRUCTURE SECURITY12 Nov 2026 · 15:50 GST
At a glance
SectorFinancial services · South Korea
My roleFractional CTO and AI architect
EngagementAssessment, architecture and delivery leadership
ScopeInference engine patching, serving isolation, network policy, egress control, model provenance, secrets, telemetry and incident response
What changed
  • Inference engines tracked and patched like any other critical software
  • Model servers reachable only through an authenticated internal gateway
  • Serving processes isolated, with no route to the internet or to unrelated systems
  • Models loaded only from an internal registry, with remote code execution disabled
  • Prompts, keys and customer data kept out of logs, with alerts on unusual server behaviour
vLLM and SGLang model serversKubernetes with network policiesSandboxed container runtime for servingInternal inference gatewayPrivate model registry with signaturesEgress proxy with allowlistsSecrets managerOpenTelemetry and runtime alerts

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

A South Korean fintech offered payments, savings and investment features in a mobile app. Its AI features, a support assistant, transaction categorisation and document reading, had started on external model APIs. To keep customer data in-house and control cost, the company moved them to open-weight models served on its own GPUs, using vLLM for most models and SGLang for a few latency-sensitive ones. The data science team had done it quickly: models pulled from public repositories, servers running in the same Kubernetes cluster as other services, and serving APIs reachable from anything inside that cluster.

Korea's AI Basic Act, in force from January 2026, adds transparency and risk management expectations for AI systems, particularly high-impact ones5. The more immediate concern for the board was simpler: customer financial data now flowed through software the security team had never reviewed.

Why now. Inference engines had become a target. In November 2026, NEAR AI disclosed that an attacker used a remote code execution flaw in SGLang to run code on one of its inference servers and observe in-flight requests, including ones protected by confidential computing12. vLLM had its own advisories during 2026, including a flaw that let a malicious model repository run code even when remote code was disabled, and a remote code execution path through video inputs34.

What had to be true

  • Patched: inference engines tracked and updated like any critical dependency.
  • Unreachable: model servers accessible only through an authenticated gateway.
  • Contained: a compromised server cannot reach the internet or unrelated systems.
  • Trusted models: only vetted models, loaded without running their own code.
  • Clean logs: prompts, customer data and keys kept out of telemetry.
  • Watched: unusual behaviour on serving nodes raises an alert.

Architecture

Callers
App servicessupport, categorisation, documents
Gateway
Inference gatewayauthentication, quotas, input checks
Serving
Isolated namespacesandboxed runtime, non-rootvLLM and SGLangpinned, patched versions
Boundaries
Network policiesgateway in, nothing elseEgress proxyregistry and telemetry onlyModel registrysigned, scanned models
Evidence
Telemetrymetadata, no prompts by defaultRuntime alertsnew processes, new connections
The model server sits in a box with one door in, one narrow door out and someone watching.

All application calls went through an internal inference gateway that authenticated callers, enforced quotas and rejected input types a route did not need, such as video or arbitrary URLs. Model servers moved to a dedicated namespace and node pool, ran as non-root in a sandboxed container runtime, and accepted traffic only from the gateway.

Kubernetes cluster networking diagram showing services routing to pods across three nodes, with all pods on one shared pod network and all nodes on one node network
By default, pods share one flat network: a compromised model server could reach everything else. Network policies turn that into explicit, narrow paths. Source: Kubernetes documentation · CC BY 4.0

Network policies blocked all traffic to and from the serving namespace except from the gateway and to an egress proxy, which allowed only the internal model registry and the telemetry endpoint6. A compromised server would find no route to the internet, to databases or to other services.

The data flow, end to end

  1. CallAn app service sends a request to the gateway with its service identity
  2. CheckThe gateway authenticates, applies quotas and strips unneeded input types
  3. ServeAn isolated model server processes the request
  4. ReturnThe answer goes back through the gateway, which applies output checks
  5. RecordMetadata is logged: route, model, latency and tokens, not the prompt
  6. WatchRuntime sensors flag unexpected processes or connections on serving nodes
Customer data passes through the model server but nothing else can reach it there.

The hard part: keeping up with engines and models

Patching fast-moving engines. Inference engines release often, and upgrades can change performance or model support. The team pinned versions per model, subscribed to the projects' security advisories, and kept an evaluation and load test for each model so an upgrade could be validated within days rather than deferred for months.

Trusting models, not just code. A model is not just weights; some repositories include code that runs when loaded. The vLLM advisory showed that disabling remote code was not always enough3. Models were therefore imported once into an internal registry after review, scanned, signed and loaded only from there, with remote code disabled and serving processes unable to reach public repositories.

Not over-trusting confidential computing. The team evaluated confidential computing for the most sensitive workloads, and the NEAR AI incident shaped how: it protects data from the host and operator, not from flaws in the engine inside the enclave1. Confidential computing became one layer, alongside patching and isolation, not a replacement for them.

Treat a model server like any other service that handles customer data: patch it, hide it, box it in and watch it. The AI part does not earn it an exemption.

How it ran

Platform
  1. Serving namespace and node pool
  2. Network policies and egress
  3. Sandboxed runtime
ML engineering
  1. Version pinning
  2. Internal model registry
  3. Upgrade evaluations
Security
  1. Advisory tracking
  2. Runtime alerts
  3. Incident runbook
Risk and compliance
  1. Data flow records
  2. AI Basic Act mapping
  3. Evidence for auditors
ML engineering kept models current; platform and security made sure a bad day stayed small.
Phase 1Inventory
  • Engines and versions
  • Models and sources
  • Who can reach servers
Phase 2Contain
  • Gateway in front
  • Network policies
  • Egress proxy
Phase 3Trust
  • Internal registry
  • Remote code disabled
  • Signed models
Phase 4Sustain
  • Advisory tracking
  • Upgrade tests
  • Runtime alerts
Containment came first: it reduced risk immediately while patching processes matured.

Key decisions and trade-offs

DecisionAlternativeWhy
Gateway in front of every model serverServices call model servers directlyOne place to authenticate, limit and filter input
Deny-by-default network policiesRely on the cluster being internalA compromised server finds nowhere to go
Internal model registry onlyPull models from public repositories at start-upModels are reviewed once and cannot change underneath you
Strip unneeded input types at the gatewayLet engines handle everythingShrinks the attack surface, as the video flaw showed
Metadata-only telemetry by defaultLog prompts for debuggingCustomer data stays out of logging systems
Confidential computing as one layerTreat it as sufficientIt does not protect against flaws inside the enclave

What I'd do again, and differently

Again: put the gateway and network policies in place first; they cut exposure in days. Differently: build the upgrade evaluation for each model at the start, so security patches never waited on performance testing. Related: the 12 November tech news, AI model supply chain security, Kubernetes inference gateways, the Korean hiring platform case study and where I work.

If you serve your own models and have not reviewed them as you would any other service, see my AI architecture work, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
FAQ

Common questions

Why are inference engines a security risk?

Engines such as vLLM and SGLang are large, fast-moving codebases that parse untrusted input, load model files and often expose internal APIs. Recent advisories and incidents have included remote code execution flaws, so they need the same patching and isolation as any internet-facing service.

Does confidential computing make self-hosted inference safe?

It protects data from the host and operator, but not from vulnerabilities in the software running inside the protected environment. A flaw in the inference engine can still expose requests, so patching and isolation remain essential.

What is trust_remote_code and why disable it?

It is an option that lets a model repository run its own Python code when loaded. With it enabled, a malicious or tampered model can execute code on your server. Keep it disabled and load models only from a vetted internal registry.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.