Back

ML09: Output Integrity Attack - Overview

What is an Output Integrity Attack?

An Output Integrity Attack targets the model's result after the model has produced it. The attacker tampers with the prediction on the path between the model and whatever consumes it—a downstream service, a database, a message queue, an operator's dashboard, or the user interface—so that the decision the system finally acts on is not the decision the model actually made.

This is a failure of integrity, not of accuracy. The model can be perfectly trained, perfectly robust, and completely correct; ML09 is about what happens to its answer in transit and at the boundary. If a fraud model outputs "fraud": true and an attacker flips that to "fraud": false before the payment service reads it, the model was right and the system was still wrong.

ML09 is not about fooling the model. Crafting an input that makes the model itself produce a wrong answer is ML01 (Input Manipulation / Adversarial Attack). ML09 assumes the model produced the correct output and asks: what protects that output on its way to the thing that acts on it?

Core Concept

What the model produced        What the consumer acted on
-----------------------        --------------------------
{ "label": "malware",          { "label": "benign",
  "score": 0.985 }      ==>      "score": 0.010 }
          |                              ^
          |   attacker tampers with      |
          +---- the result in transit ---+
               (or in a store / queue /
                cache / log / UI layer)

The prediction is a security-critical MESSAGE.
Without authenticity + integrity protection, anything
on the path can rewrite the decision undetected.

Where the Output Can Be Tampered

The "output path" is longer than it looks. A single prediction typically crosses several trust boundaries before anything acts on it:

Why Does This Matter?

Machine-learning outputs increasingly drive automated, security-critical decisions with no human in the loop: allow or deny a transaction, quarantine or release a file, admit or reject a login, escalate or dismiss an alert. When the decision itself can be rewritten downstream, every one of those controls becomes bypassable—without ever touching the model.

Business Impact

Technical Impact

Technical Context

The Prediction Is a Security-Critical Message

The durable way to think about ML09 is to treat every prediction as a message that a downstream component will act on. Messages that drive decisions need two properties independent of transport:

Encryption alone (confidentiality) does not provide these; and TLS protects a hop, not the message once it is stored or forwarded. That is why ML09 defenses combine secure channels with signed/authenticated results that the consumer independently verifies.

Common ML09 Scenarios

1. Interception and Alteration in Transit

Model server ---(plain HTTP inference API)---> Caller
                      ^
              MITM rewrites the JSON body:
              {"decision":"deny"}  ->  {"decision":"allow"}

Risk: An unencrypted or unauthenticated inference API lets anyone on the path silently change the verdict the caller receives.

2. Tampering at the Integration / UI Layer

Model -> adapter/gateway -> UI widget -> human or automation acts
                 ^                ^
      compromised component  or  client-side value the
      substitutes a verdict      browser trusts and can be edited

Risk: A component that reshapes the raw score into a shown/acted-on decision can substitute a different one. If the UI trusts a value the client controls, the displayed verdict is not the model's.

3. Manipulating a Shared Results Store / Queue / Cache

Model --> writes result to DB / Kafka topic / Redis cache
                              ^
          any principal with write access edits the record
          at rest before the consumer reads it

Risk: Predictions parked for asynchronous consumption are only as trustworthy as the access control and integrity protection on that store.

4. Altering Logged or Downstream-Consumed Outputs

Model output -> log line / export / metrics -> SIEM, billing,
                                               auto-response, retraining
                     ^
        edited record makes downstream systems act on a false value

Risk: Systems that consume recorded outputs as ground truth inherit any tampering of those records.

5. Verdict Flipping by a Compromised Component

"fraud"  -> "benign"      "malware" -> "clean"      "deny" -> "allow"

Risk: A single compromised hop that handles results can invert exactly the decisions a security control depends on.

6. Replaying Stale Results

t0: model says {"risk":"low"}  (captured)
t1: model says {"risk":"high"} (current, correct)
attacker re-serves the t0 result -> consumer acts on stale "low"

Risk: Without freshness binding (nonce/timestamp), an old but validly-shaped result can be replayed to force an outdated decision.

Boundaries Where Output Integrity Is Lost

BoundaryTypical WeaknessConsequence
Inference API in transitPlain HTTP, no mutual auth, no message signatureMITM rewrites the verdict
Integration / gateway layerCompromised or over-trusted adapterSubstituted decision
UI / clientClient-controlled value trusted as the resultDisplayed/acted verdict is not the model's
Results store / queue / cacheBroad write access, no integrity on recordsAt-rest tampering before consumption
Logs / downstream feedsMutable records consumed as ground truthCorrupted analytics, billing, retraining
FreshnessNo nonce/timestamp bindingReplay of stale results

Real-World Impact

Public post-mortems rarely isolate "the model was right but the output was tampered" as a named root cause, so the honest picture is drawn from well-established incident classes rather than specific CVEs or breach statistics.

Incident Class 1: Man-in-the-Middle on Unauthenticated Decision Channels

Pattern:

Impact: The consumer acts on a verdict the producer never sent. This is the same class of weakness long documented for any security-relevant value carried over cleartext; applied to ML, the tampered value is the decision itself.

Root Cause: Confidentiality and integrity of the decision channel were assumed rather than enforced. Fixed by TLS/mTLS plus a signature on the result the consumer verifies.

Incident Class 2: Tampering with Results at Rest in a Shared Store or Queue

Pattern:

Impact: Asynchronous consumers read altered decisions with no indication they changed—the classic consequence of trusting a shared datastore's contents without record-level integrity.

Root Cause: Over-broad access plus no integrity protection on the records. Fixed by least-privilege access and signing each record so readers can verify it.

Incident Class 3: Client-Side Trust of a Decision Value

Pattern:

Impact: The action taken diverges from the model's actual output—the well-known consequence of trusting client-controlled data, here applied to an ML decision.

Root Cause: A security decision was placed where the client could edit it. Fixed by keeping the authoritative decision server-side and verifying a signed result before acting.

Prevalence and Statistics

Output Integrity Attack is one of the categories in the OWASP Machine Learning Security Top 10. It is easy to overlook precisely because teams concentrate their assurance on the model and the training data, while treating the prediction, once emitted, as trusted plumbing.

Rather than cite precise figures (which are scarce and vary by source), the defensible picture is:

Note: there is no reliable public breach count isolating ML09 as the named cause. Treat any single figure as illustrative. The durable takeaway is that the enabling weaknesses are widespread and the outputs simply are not protected as the decisions they are.

Common Misunderstandings

Myth 1: "If the model is accurate, the output is trustworthy"

Reality: Accuracy is a property of the model; trustworthiness of the decision also depends on everything the result passes through afterwards. A correct output altered in transit is a wrong decision.

Myth 2: "This is just another adversarial-example (ML01) problem"

Reality: ML01 changes the input so the model itself errs. ML09 leaves the model correct and changes the output after the fact. They need different defenses—robustness for ML01, authenticity and integrity for ML09.

Myth 3: "It's all internal traffic, so integrity is unnecessary"

Reality: Internal networks are routinely reached through compromised services, lateral movement, and over-broad credentials. Internal decision channels need the same integrity protection as external ones.

Myth 4: "TLS on the endpoint means the output is protected"

Reality: TLS protects a single hop while data is on the wire. It does nothing once the result is written to a store, placed on a queue, logged, or forwarded. End-to-end authenticity needs the result itself to be signed and verified.

Myth 5: "We log every prediction, so we'd notice tampering"

Reality: If the logs are the thing that was altered—or are mutable and unsigned—they record the attacker's value, not the model's. Logs must be tamper-evident to be evidence.

Myth 6: "Signing the result is overkill for a prediction"

Reality: A prediction that gates a payment, a file, or an access decision is exactly as security-critical as any authorization token. If you would authenticate the token, authenticate the decision.

How ML09 Differs from Related Issues

AspectML09 Output IntegrityML01 Input ManipulationML02 Data Poisoning
What is attackedThe result after the model produced itThe input to the modelThe training data
Is the model correct?Yes—output altered downstreamNo—model is fooledNo—model learned wrong behaviour
Where it livesTransit, store, queue, UI, logsInference input pathTraining pipeline
Typical fixTLS/mTLS + sign & verify resultsRobustness, input validationData provenance, sanitisation

Key Takeaways

  1. The decision, not just the model, must be protected—ML09 lives on the path between the model and whatever acts on the result.
  2. Correct model, wrong decision—a flipped verdict subverts a security control while the model's metrics look healthy.
  3. Treat the prediction as a security-critical message—it needs authenticity and integrity, not just confidentiality.
  4. Protect the whole path—transit, stores, queues, caches, UIs, and logs, not only the serving endpoint.
  5. Bind freshness—without a nonce or timestamp, a stale-but-valid result can be replayed.

How to Identify if You're Vulnerable

Ask these questions about your inference pipeline:

If you answered "no" or "not sure" to several of these, a correct prediction in your system can likely be altered before it is acted on.

Next Steps