← Scenario library

The Dataset That Ran Code

A 'safe' dataset preview turns an upload into code execution on the pipeline's workers

Technique first revealed Feb 2024

Training-Data Pipeline
Untrusted web (mutable)Data pipelineModel⧚⧚publishes malicious dataset⧚⧚⧚⧚🌐Web sources(URLs)πŸ“₯Crawl / scrapeπŸ—„οΈTrainingdataset🧬Trained weights🧠ModelπŸ§‘Attacker(datasetπŸ”§Preview/statsworker (codeπŸ”Worker env &cloud/clusterπŸ—οΈInternalbuild/training🌐Public-serviceC2 / exfil
InstructionsDataActionsControl / decisionFeedback / logs⧚crosses a trust boundary
πŸ‘† Click a component or flow to inspect
SetupStep 1 / 6

A dataset that is more than data

An attacker uploads a dataset that looks completely ordinary β€” some text files, a config, a small loading helper. But two of those pieces are quietly built to run code the moment anything opens the dataset.

βš™οΈUploaded dataset repo (illustrative, redacted)config
# repo: attacker/looks-legit-corpus

# --- dataset config ---
loader: custom            # selects a shipped loader script
trust_remote_code: true   # <-- worker will EXECUTE loader.py
preview_template: "{{ <REDACTED expression that resolves to a shell call> }}"  # template-injection field

# --- loader.py (ships with the dataset, runs on the worker) ---
def _build(...):
    # [REDACTED] on import: contacts an attacker host and drops a stage-2 payload
    ...

# To a skim it looks like harmless dataset plumbing. It is two code-exec sinks.

AI RiskAtlas is an educational model of how GenAI & agentic systems work and fail. Architectures and payloads are illustrative and simplified for learning β€” not operational guidance. Real-world cases are summarised from public reporting.

Sources & further reading β†’Β·Built by Shi Yuan β†—