A Data Store Should Hold Data, Not Code
A shared targets pipeline store can contain a custom format whose read, write, unmarshal and convert functions are stored as source text. When a collaborator reads the pipeline, targets reconstructs those functions with eval(parse()), so a malicious store runs arbitrary R code.
Published on r3vpwnx.medium.com
Cybersecurity
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
targets is a pipeline framework for R. It tracks which steps of a pipeline are up to date, caches each object in a _targets store, and rebuilds only what changed. The store is the shared artifact of that workflow: it gets committed to repositories, pushed to cloud content-addressed backends, and handed between collaborators so that a pipeline reproduces elsewhere.
Because the store has to be readable back, it also records how each object was serialised. For a custom format, the metadata carries the read, write, unmarshal and convert functions as source text. When the pipeline is read, targets reconstructs those functions from that text. That design decision is the subject of this write-up, tracked as CVE-2026-133707.

Setup
The write-up does not describe a lab environment, accounts or tooling. The precondition is simply a shared _targets store: a store that a collaborator receives, clones or pulls, and then reads with the normal targets functions. The affected code paths are in R/class_store_format_custom.R and R/class_store_repository_cas.R. The issue was fixed in targets 1.12.1.
Finding it
The researcher looked at how a custom store format is reconstructed when a pipeline is read. In R/class_store_format_custom.R, store_format_custom_call_method does the following:
what <- eval(parse(text = text))
and then calls do.call(what, args). The same eval(parse()) pattern backs the content-addressed store in R/class_store_repository_cas.R.
The function source comes from the on-disk meta$format, which is part of the store. The store is attacker-controlled the moment it is shared. So the metadata that is supposed to describe a serialisation format is in fact executable code that the reader will evaluate.
Exploitation
Step 1: craft a store that declares a custom format
An attacker builds a _targets store whose meta$format declares a custom format with a read function containing arbitrary R code, for example:
read = function(path) system("whatever")
Because the function is stored as source text inside the store, no separate payload delivery is needed: the store itself is the payload.
Step 2: get the store to a collaborator
The store is shared the way stores normally are: committed to a repository, pushed to a cloud content-addressed backend, or handed to another person so that the pipeline reproduces on their machine.
Step 3: the victim reads the pipeline
When the collaborator runs tar_read(), tar_load() or tar_make() against the store, targets reconstructs the declared functions from the stored source text through eval(parse(text = text)) and then invokes them with do.call(what, args). The attacker's R code runs in the collaborator's session.
There is no prompt and no opt-in: reading the pipeline is the trigger.
Root cause
The store serializes a function's source into an artifact and later evaluates it with eval(parse()). That makes the artifact executable rather than purely data. The function source is read from the on-disk meta$format, which is part of the store and therefore under the control of whoever produced the store. Any executable artifact that crosses a trust boundary turns into a remote code execution bug as soon as the file is shared.
The weakness is classified as CWE-95 and CWE-94.
Impact
An attacker who can get a malicious _targets store in front of a collaborator can run arbitrary R code in that collaborator's session as soon as the collaborator reads the pipeline with tar_read(), tar_load() or tar_make(). The victim does not have to do anything beyond the ordinary read operation, and no confirmation is requested. The impact depends on the trust placed in shared stores, which the workflow treats as reproducible artifacts rather than untrusted input.
Fix
The issue was fixed in targets 1.12.1. The write-up does not describe the code change itself. The principle it states is that a data store should hold data, not code: once a function's source is serialised into an artifact and evaluated with eval(parse()), the artifact is executable, and anything executable that crosses a trust boundary is a remote code execution bug waiting for someone to share the file.
Variants to test
- Other custom-format hooks. Look for the same reconstruction pattern applied to the write, unmarshal and convert functions, not only
read. A positive result is any of those fields being passed througheval(parse())when a store is read. - Content-addressed backends. The write-up notes that the same
eval(parse())pattern backs the content-addressed store inR/class_store_repository_cas.R. Test stores pulled from a cloud content-addressed backend. A positive result is code execution triggered by a normal read against a remote store. - Other pipeline frameworks with cached metadata. Any tool that caches per-object metadata describing how to deserialise it is a candidate. A positive result is a cached artifact whose metadata is interpreted as code on read.
- Serialised function fields in shared artifacts. Search shared artifacts for fields that hold function source text. A positive result is a field that is evaluated rather than compared or displayed when the artifact is loaded.
What happened, in plain words
A tool called targets helps people who write R code (a programming language used a lot in statistics and data science) keep their analysis organised. You describe a series of steps, and targets remembers which steps have already been done and which need redoing. It saves the results of each step in a folder called a _targets store. That store is meant to be shared: you can put it in a code repository, upload it to cloud storage, or send it to a colleague so they can reproduce your work on their machine.
The problem is that the store does not only contain data. It also contains instructions, written as text, about how to read that data back. When someone opens the store with the normal targets commands, the tool takes those instructions and runs them as R code. If an attacker prepares the store, the instructions can be malicious, and the attacker's code runs on the victim's computer the moment the victim reads the pipeline. No warning, no confirmation. This is a remote code execution (RCE) bug: someone else can make your computer run their code. It is tracked as CVE-2026-133707 and was fixed in targets version 1.12.1.

The image at the top is the article header: the title "A Data Store Should Hold Data, Not Code", the author Dilanka Kaushal Hewage (r3vpwnx), and the line "How a shared targets pipeline store runs the sender's R code via eval(parse()) (CVE-2026-133707)".
Context
targets is a pipeline framework for R. A pipeline is simply a chain of steps: load data, clean it, fit a model, make a chart. The framework tracks which steps are up to date, caches each object (each result) in a _targets store, and rebuilds only what changed. The store is the shared artifact of that workflow: it gets committed to repositories, pushed to cloud content-addressed backends, and handed between collaborators so that a pipeline reproduces elsewhere.
Two ideas in that paragraph need unpacking for a newcomer.
- A cache is a saved copy of work you have already done, kept so you do not have to do it again. Think of a browser cache: pages you visited load faster because pieces are stored locally.
- A content-addressed backend is a storage system that names each file by a fingerprint of its contents rather than by a filename you choose. If two files have the same contents, they get the same name. Cloud services often work this way. The point here is that the store can live remotely, not only on your own disk.
Because the store has to be readable back, it also records how each object was serialised. Serialisation means turning an object in memory (a table, a model, a function) into a stream of bytes that can be written to disk or sent over a network, so it can later be turned back into the same object. The reverse step is called deserialisation.
For a custom format, the metadata carries the read, write, unmarshal and convert functions as source text. Metadata is data about data: here, notes stored alongside the cached objects describing how they should be handled. A custom format is a user-defined way of saving and loading objects, instead of the built-in ones. The metadata stores the actual R functions, as text, that know how to read, write, unmarshal (turn bytes back into an object) and convert the data.
When the pipeline is read, targets reconstructs those functions from that text. That design decision is the subject of this write-up, tracked as CVE-2026-133707. A CVE is a public catalogue entry for a known security flaw, giving it a permanent ID so people can refer to it unambiguously.
Setup
The write-up does not describe a lab environment, accounts or tooling. The precondition is simply a shared _targets store: a store that a collaborator receives, clones or pulls, and then reads with the normal targets functions. The affected code paths are in R/class_store_format_custom.R and R/class_store_repository_cas.R. The issue was fixed in targets 1.12.1.
In plain terms: you do not need special access or a complicated setup to be exposed. You only need to use a store that someone else gave you, in the ordinary way, and then read it with the ordinary commands. The two file names are the parts of the targets source code where the dangerous behaviour lives: one handles custom store formats, the other handles the content-addressed store.
Finding it
The researcher looked at how a custom store format is reconstructed when a pipeline is read. In R/class_store_format_custom.R, store_format_custom_call_method does the following:
what <- eval(parse(text = text))
and then calls do.call(what, args). The same eval(parse()) pattern backs the content-addressed store in R/class_store_repository_cas.R.
Line by line:
textis a piece of text taken from the store's metadata. It is supposed to describe a function, for example how to read a file.parse(text = text)turns that text into an R expression, the internal form that R can execute. Think of it as turning a written recipe into a set of instructions the kitchen can follow.eval(...)then actually runs that expression. This is the dangerous part:evalexecutes whatever it is given. If the text says "delete these files",evalwill try to delete them.what <- ...stores the result in a variable calledwhat. In the normal case, the result is a function that can later be called.do.call(what, args)calls that function with the arguments inargs. Ifwhatis the attacker's function, the attacker's code runs at this point.
The function source comes from the on-disk meta$format, which is part of the store. The store is attacker-controlled the moment it is shared. So the metadata that is supposed to describe a serialisation format is in fact executable code that the reader will evaluate.
Why this matters: metadata is normally treated as passive description, like the label on a jar. Here the label is itself a set of instructions, and the tool follows them. Anyone who can write the label can therefore decide what happens when the jar is opened.
Exploitation
Step 1: craft a store that declares a custom format
An attacker builds a _targets store whose meta$format declares a custom format with a read function containing arbitrary R code, for example:
read = function(path) system("whatever")
Line by line:
read = function(path) ...defines a function calledreadthat takes one argument,path. In a normal store, this function would open the file atpathand return its contents.system("whatever")is an R function that runs an operating-system command. The string"whatever"stands for any command the attacker wants to run. In a real attack it would be something harmful, such as downloading a program or reading private files.
Because the function is stored as source text inside the store, no separate payload delivery is needed: the store itself is the payload. A payload is the part of an attack that actually does the damage, as opposed to the part that merely gets it into place.
Step 2: get the store to a collaborator
The store is shared the way stores normally are: committed to a repository, pushed to a cloud content-addressed backend, or handed to another person so that the pipeline reproduces on their machine.
This is the social part of the attack. The attacker does not need to break into anything; they only need the victim to accept a file through a channel the victim already trusts. A repository here means a version-controlled project folder, such as one hosted on a code-sharing site. "Committed" means saved into that project's history. "Pushed" means uploaded to a remote copy.
Step 3: the victim reads the pipeline
When the collaborator runs tar_read(), tar_load() or tar_make() against the store, targets reconstructs the declared functions from the stored source text through eval(parse(text = text)) and then invokes them with do.call(what, args). The attacker's R code runs in the collaborator's session.
What those three commands do, in ordinary terms:
tar_read()reads one cached result from the store.tar_load()loads cached results into the current R session so you can use them.tar_make()runs the pipeline, rebuilding whatever is out of date.
All three are normal, everyday commands. None of them is described as dangerous, and none of them asks the user to confirm anything. A session is the running copy of R that the person is using; code that runs there runs with that person's permissions, on that person's machine.
There is no prompt and no opt-in: reading the pipeline is the trigger.
Root cause
The store serializes a function's source into an artifact and later evaluates it with eval(parse()). That makes the artifact executable rather than purely data. The function source is read from the on-disk meta$format, which is part of the store and therefore under the control of whoever produced the store. Any executable artifact that crosses a trust boundary turns into a remote code execution bug as soon as the file is shared.
A trust boundary is the line between parties who trust each other and parties who do not. Your own files are inside the boundary; a file a stranger sends you is outside it. The bug is that targets treated a file from outside the boundary as if it were safe data.
The weakness is classified as CWE-95 and CWE-94. CWE is a catalogue of weakness types, similar in spirit to CVE but for categories of mistake rather than individual incidents. CWE-94 is code injection: untrusted input is turned into code. CWE-95 is eval injection: the specific case where the input is passed to an eval-like function.
Impact
An attacker who can get a malicious _targets store in front of a collaborator can run arbitrary R code in that collaborator's session as soon as the collaborator reads the pipeline with tar_read(), tar_load() or tar_make(). The victim does not have to do anything beyond the ordinary read operation, and no confirmation is requested. The impact depends on the trust placed in shared stores, which the workflow treats as reproducible artifacts rather than untrusted input.
"Reproducible" here means that someone else can take your store and your code and get the same results. That is a good property for science, but it means stores are passed around freely, and the habit of passing them around is exactly what the attacker relies on.
Fix
The issue was fixed in targets 1.12.1. The write-up does not describe the code change itself. The principle it states is that a data store should hold data, not code: once a function's source is serialised into an artifact and evaluated with eval(parse()), the artifact is executable, and anything executable that crosses a trust boundary is a remote code execution bug waiting for someone to share the file.
The issue was fixed in targets 1.12.1.
Variants to test
These are directions for further research, not confirmed bugs. Each one describes where to look and what would count as a hit.
- Other custom-format hooks. Look for the same reconstruction pattern applied to the write, unmarshal and convert functions, not only
read. A positive result is any of those fields being passed througheval(parse())when a store is read. - Content-addressed backends. The write-up notes that the same
eval(parse())pattern backs the content-addressed store inR/class_store_repository_cas.R. Test stores pulled from a cloud content-addressed backend. A positive result is code execution triggered by a normal read against a remote store. - Other pipeline frameworks with cached metadata. Any tool that caches per-object metadata describing how to deserialise it is a candidate. A positive result is a cached artifact whose metadata is interpreted as code on read.
- Serialised function fields in shared artifacts. Search shared artifacts for fields that hold function source text. A positive result is a field that is evaluated rather than compared or displayed when the artifact is loaded.
Glossary
- R: a programming language widely used for statistics and data analysis.
- Pipeline: a chain of processing steps, where the output of one step feeds the next.
targets: an R package that runs and caches pipeline steps._targetsstore: the folder wheretargetskeeps cached results and metadata.- Cache: a saved copy of work so it does not have to be redone.
- Artifact: a file produced by a process, here the store and its contents.
- Serialisation: turning an in-memory object into bytes that can be saved or sent.
- Deserialisation: turning saved bytes back into an in-memory object.
- Unmarshal: another word for deserialisation, used in the report's list of format functions.
- Metadata: data that describes other data, such as how a cached object should be read.
- Custom format: a user-defined way of saving and loading objects.
- Content-addressed backend: storage that names files by a fingerprint of their contents; often remote cloud storage.
- Repository: a version-controlled project folder, often hosted online.
- Commit: saving changes into a repository's history.
- Push: uploading local repository changes to a remote copy.
eval(): an R function that executes code given to it.parse(): an R function that turns text into an executable expression.eval(parse()): the combination that turns stored text into running code; the core of this bug.do.call(): an R function that calls another function with a list of arguments.system(): an R function that runs an operating-system command.- Payload: the part of an attack that performs the harmful action.
- Remote code execution (RCE): a flaw that lets an attacker run their code on someone else's machine.
- Session: the running copy of R that a person is using, with that person's permissions.
- Trust boundary: the line between parties or data you trust and those you do not.
- CVE: a public identifier for a specific known vulnerability.
- CWE: a catalogue of weakness categories; CWE-94 is code injection and CWE-95 is eval injection.
tar_read(),tar_load(),tar_make(): the normaltargetscommands for reading, loading and building a pipeline.- Reproducible: able to be re-run elsewhere and produce the same results.