Cloudanix VulnDB

CVE-2016-2781

Medium · 4.6

CVSS

4.6

EPSS

0.4%

Published

Feb 7, 2017

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A long-known flaw in a common system tool can let a local user break out of a restricted folder environment, but the issue has been fixed in updated software packages and is unlikely to affect most current systems.

Exploitation
Requires User Interaction
Attacker needs
Low Privilege
Complexity
Low
Impact
Privilege Gain
Component
Application
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The chroot utility in GNU coreutils, when invoked with --userspec, fails to properly isolate the process environment, allowing a local user to issue a TIOCSTI ioctl that injects characters directly into the controlling terminal's input buffer and thereby escape the chroot jail back to the parent session.

Why it matters to the business

Organizations running affected container images or packages may expose local privilege boundaries inside sandboxes or restricted environments, increasing the chance that a compromised low-privileged process can reach the host session; however the vulnerability is more than eight years old, carries low exploit probability, and is already addressed in current package revisions, limiting immediate operational risk.

How an attack unfolds

An attacker with local access on a system using the vulnerable coreutils chroot binary first invokes chroot with the --userspec flag to enter a restricted environment, then crafts and sends a TIOCSTI ioctl call that pushes arbitrary keystrokes into the terminal input queue, allowing commands to execute outside the chroot and regain access to the parent session.

How to fix it

Upgrade telegraf-1.26 packages on Chainguard and Wolfi to version 1.26.3-r9 or later; rebuild any downstream container images that embed the vulnerable coreutils chroot binary; replace any custom builds that still ship the pre-2017 coreutils release.

How to confirm the fix worked

Confirm the installed coreutils version reports a build date after the upstream fix; run the chroot binary with --version inside a test container and verify the package revision matches 1.26.3-r9 or newer; re-execute any internal chroot-based test harnesses to ensure the TIOCSTI escape path is no longer reachable.

Typical attack path

  1. Obtain a local shell or process context on the target host
  2. Invoke chroot --userspec to enter the restricted environment
  3. Issue a crafted TIOCSTI ioctl against the controlling terminal
  4. Inject commands that execute with the privileges of the parent session
  5. Pivot or persist from the escaped context

How to detect it

Search process execution logs and audit trails for invocations of the chroot binary that include the --userspec flag followed by unusual ioctl activity on tty devices; review any historical container runtime logs that show unexpected parent-session access after a chroot call.

What your security team should do

  • Prioritize patching telegraf images to the stated fixed revisions within normal maintenance windows
  • Audit any internal pipelines that explicitly call coreutils chroot with --userspec and replace them with safer isolation primitives such as unshare or container namespaces
  • Add package-version checks for coreutils to existing SBOM or image-scanning policies

The record

chroot in GNU coreutils, when used with --userspec, allows local users to escape to the parent session via a crafted TIOCSTI ioctl call, which pushes characters to the terminal's input buffer.

Affected packages

Ecosystem Package Introduced Fixed
Chainguard coreutils 0 0
Chainguard coreutils 0 9.6-r30
Chainguard coreutils-doc 0 9.6-r30
Chainguard coreutils-legacy 0 9.6-r30
Debian:10 coreutils 0 No fix
Debian:11 coreutils 0 No fix
Debian:12 coreutils 0 No fix
Debian:13 coreutils 0 No fix
Ubuntu:14.04:LTS coreutils 0 No fix
Ubuntu:16.04:LTS coreutils 0 No fix
Ubuntu:18.04:LTS coreutils 0 No fix
Ubuntu:20.04:LTS coreutils 0 No fix
Ubuntu:22.04:LTS coreutils 0 No fix
Ubuntu:24.04:LTS coreutils 0 No fix
Ubuntu:24.10 coreutils 0 No fix
Ubuntu:25.04 coreutils 0 No fix
Ubuntu:25.10 coreutils 0 No fix
Ubuntu:Pro:14.04:LTS coreutils 0 No fix
Ubuntu:Pro:16.04:LTS coreutils 0 No fix
Ubuntu:Pro:18.04:LTS coreutils 0 No fix
Ubuntu:Pro:20.04:LTS coreutils 0 No fix
Wolfi coreutils 0 9.6-r30
Wolfi coreutils-doc 0 9.6-r30
Wolfi coreutils-legacy 0 9.6-r30

Related vulnerabilities