Cloudanix VulnDB

CVE-2016-8714

High · 8.8

CVSS

8.8

EPSS

2.4%

Published

Mar 10, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older version of the R data analysis tool lets attackers run harmful code simply by tricking someone into opening a specially made file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Remote Code Execution
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability is a buffer overflow in the LoadEncoding function of R 3.3.0 triggered by a crafted R script, resulting in memory corruption that can lead to arbitrary code execution.

Why it matters to the business

Organizations relying on R for statistical computing and data analysis face risk of unauthorized code execution on analyst workstations or servers, potentially leading to data theft, tampering with analytical results, or lateral movement in environments where R scripts are processed from untrusted sources.

How an attack unfolds

An attacker crafts a malicious R script that exploits the LoadEncoding buffer overflow and delivers it via email, shared file, or web download; when a victim loads or executes the script in vulnerable R 3.3.0, the overflow corrupts memory and allows the attacker to run arbitrary code.

How to fix it

Upgrade the R installation to a version newer than 3.3.0 that contains the fix for the LoadEncoding buffer overflow; apply vendor patches or rebuild from source if using custom distributions; restrict execution of untrusted R scripts and implement script signing or sandboxing where feasible.

How to confirm the fix worked

Verify the installed R version is newer than 3.3.0; test with known non-malicious scripts that exercise LoadEncoding to confirm continued functionality; review package manifests and dependency trees for any pinned 3.3.0 instances across the environment.

Typical attack path

  1. Identify targets that run R 3.3.0 and accept external scripts
  2. Craft malicious R script containing oversized input for LoadEncoding
  3. Deliver script to victim via phishing, shared storage, or web link
  4. Victim opens or sources the script triggering LoadEncoding
  5. Exploit executes payload achieving code execution or memory corruption

How to detect it

Review process execution logs and file access records for R processes loading scripts from unexpected locations; look for abnormal memory usage or crashes in R shortly after script execution; examine email and file-share logs for recently received .R or .r files around the time of any suspicious R activity.

What your security team should do

  • Immediately inventory all systems running R and identify any still on 3.3.0
  • Prioritize upgrade of R in internet-facing or multi-user analysis environments
  • Block or quarantine R scripts received from external sources until upgraded
  • Add R version checks to configuration management and vulnerability scanning policies

The record

An exploitable buffer overflow vulnerability exists in the LoadEncoding functionality of the R programming language version 3.3.0. A specially crafted R script can cause a buffer overflow resulting in a memory corruption. An attacker can send a malicious R script to trigger this vulnerability.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 r-base 0 3.3.3-1
Debian:12 r-base 0 3.3.3-1
Debian:13 r-base 0 3.3.3-1
Debian:14 r-base 0 3.3.3-1
Debian:7 r-base 0 2.15.1-4+deb7u1
Debian:8 r-base 0 3.1.1-1+deb8u1
Mageia:5 R-base 0 3.1.2-2.1.mga5
Ubuntu:Pro:14.04:LTS r-base 0 3.0.2-1ubuntu1.1~esm2
Ubuntu:Pro:16.04:LTS r-base 0 3.2.3-4ubuntu0.1~esm3

Related vulnerabilities