Home / Knowledge hub / Model theft
Knowledge hub
Model theft
Copying a proprietary model by extracting its weights or imitating its answers.
What it means
Model theft is the copying of a proprietary machine learning model that someone else built. It takes two main forms. One is stealing the model files, known as the weights, from storage or a build system. The other is model extraction, where an attacker queries your model many times and trains a copy on the answers.
The idea that makes it click: the model is an asset you paid to build, and a trained model does not need to be broken into to be copied. If your API returns good answers to anyone who asks, the answers are themselves a way to rebuild much of the value.
Why it matters
A model can hold months of work, private training data and a competitive edge. A stolen copy lets a rival skip that cost, or lets an attacker study the model offline to find weaknesses and plan inputs that fool it. Where training data included private information, a copy can leak parts of it.
There is also a running cost. Heavy querying to extract a model pays no fee if your API is free or loosely metered, and it can be expensive to serve. Earlier editions of the OWASP list of risks for large language model applications named model theft explicitly, and later editions cover extraction under unbounded consumption.
How it shows up
The file route runs through ordinary weaknesses: an exposed cloud storage bucket, a leaked credential in a repository, an over-broad role, or an insider. See S3 bucket exposure and hardcoded secrets. The query route runs through an API with no rate limiting and rich output, such as full probability scores.
Reduce the risk by locking down storage and build systems with least privilege, authenticating and limiting API use per account, returning only what clients need, and watching for patterns of systematic querying. Contract terms can forbid copying, but they do not stop it. Treat it as an application security problem first.
Questions people ask
Model theft, answered
What is model extraction?
Model extraction is the query-based route to model theft. An attacker sends many carefully chosen inputs, records the outputs, and trains a new model to behave similarly.
It needs no access to your files, only to your API.
Can rate limiting stop model theft?
It slows query-based extraction and raises its cost, but does not remove the risk if the attacker is patient or uses many accounts.
Combine it with per-account limits, monitoring for unusual query patterns and limited output detail.
Is model theft the same as a data breach?
Not exactly. A data breach exposes information. Model theft takes the model, though a stolen model can also leak training data.
They share causes, such as exposed storage and leaked keys.
Does keeping the model private on our server protect it?
It helps, but only as far as the server, storage and access paths are secure. Most thefts come through misconfiguration, leaked credentials or insiders.
Test the surrounding application and cloud setup, not just the model.
Is copying a model through its API illegal?
It often breaches terms of service and may raise intellectual property or computer misuse questions, depending on the country and the facts.
Law is unsettled in places. Take legal advice and do not rely on terms alone.
Sources
Where this comes from
Related
Terms that sit next to this one
OWASP LLM Top 10
The OWASP list of the main security risks in applications built on language models.
API rate limiting
Capping how many calls a client can make so abuse and cost stay bounded.
S3 bucket exposure
A cloud storage bucket left open so anyone on the internet can read its files.
Hardcoded secret
A password, API key or token written straight into source code.
AI data leakage
A model or its logs exposing private data that went into prompts or training.
How easy is it to query your API?
We test the web apps and APIs that front your model, including missing limits and access to data it should not return, and report only what we exploited. Ask us to run it on one of your applications.
Or start with a $199 pilot on one application: thirty days, success criteria agreed before day one, credited against the annual if you convert.