/

CVE-2026-133707

Severity:

HIGH RISK

(7.8)

Code Injection (CWE-95) in targets R Package Metadata

CVE-2026-133707

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-95

Impact:

Arbitrary R Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The targets R package contains a code injection vulnerability when crafted data store metadata supplies custom format or CAS repository functions that are evaluated as code. If a victim reads or loads the data store or opens its workspace, this may allow arbitrary R code to run in the victim's environment.

Affected context

The issue affects targets R package versions before 1.12.1 when data store metadata can contain attacker-controlled function definitions or expressions. The risk arises when a victim uses tar_read(), tar_load(), or tar_workspace() with a crafted data store and the metadata is passed to eval(parse()).

Exploit preconditions

  • Attack surface: Metadata in a targets data store
  • Required access: An attacker must be able to provide or influence a crafted data store that the victim uses
  • Trigger point: The victim calls tar_read(), tar_load(), or tar_workspace() on that store
  • Why exploitation is possible: Metadata-supplied format or CAS repository functions are parsed and evaluated as R code

Why this happens

The underlying issue is evaluating expressions derived from data store metadata with eval(parse()). When that metadata is attacker-controlled, parsing and evaluating it treats data as executable code, matching CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection').

Potential impact

  • Arbitrary R code could run with the privileges of the process using the data store
  • Local files or accessible data may be exposed or modified
  • The application or analysis environment could be disrupted
  • Credentials or other resources available to the process may be at risk

General mitigation guidance

Defensive patterns focus on keeping data separate from executable logic and reducing trust in imported data stores. Prefer fixed, allowlisted handling of supported formats and repositories over evaluating metadata-derived expressions. Validate metadata against a strict schema before use, limit who can create or distribute data stores, and run data-processing workflows with least privilege and restricted access to sensitive resources.

How teams detect issues like this

Review code for eval() or parse() calls that consume metadata, serialized content, or other externally influenced values. Static analysis and code review can flag dynamic evaluation and trace whether inputs are validated or constrained before use. Policy checks can restrict dynamic code evaluation and require schema validation for imported data stores; automated review tools may help identify these patterns.

Sources

SourceLink
github.comgithub.com/ropensci/targets/blob/1.12.0/R/class_store_format_custom.R
github.comgithub.com/ropensci/targets/blob/1.12.0/R/class_store_repository_cas.R
github.comgithub.com/ropensci/targets/commit/a9681eb237500c7e9a0814cfde31bd05c53d934f
github.comgithub.com/ropensci/targets/issues/1602
github.comgithub.com/ropensci/targets/releases/tag/1.12.1
vulncheck.comvulncheck.com/advisories/targets-r-package-before-1.12.1-code-execution-via-custom-storage-metadata

Frequently asked

questions

The description does not identify a network endpoint. Exploitation depends on a victim using a crafted data store, which could be supplied through a sharing or distribution workflow.

An attacker needs a way to provide or influence the data store metadata. The victim must then call tar_read(), tar_load(), or tar_workspace() on that store.

Avoid evaluating code derived from data store metadata. Use fixed, allowlisted behavior and validate metadata against a strict schema.

Keep data and executable logic separate, restrict trust in imported stores, and use least-privilege execution environments.

Find out what's already
exploitable in your codebase.