CVE-2016-3697: Github.com/opencontainers/runc Privilege Elevation Vulnerability

HIGH
Advisory Identifier: GHSA-q3j5-32m5-58c2
CVSS 7.8
CWE-269
Published
Advisory Summary

CVE-2016-3697 is a HIGH (CVSS 7.8) privilege elevation vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/opencontainers/runc libraries in the Go ecosystem. The issue involves privilege elevation in runc. Remediation is available by upgrading affected packages to version 0.1.0.

CVE-2016-3697 at a Glance

CVE Identifier CVE-2016-3697
GHSA Identifier GHSA-q3j5-32m5-58c2
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/opencontainers/runc
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2016-3697

To remediate this vulnerability, upgrade all affected Github.com/opencontainers/runc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/opencontainers/runc fixed: 0.1.0
Upgrade github.com/opencontainers/runc to 0.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/opencontainers/runc

How to Check if You Are Affected

To determine whether your application is affected by CVE-2016-3697, inspect your project dependencies for Github.com/opencontainers/runc:

inspect dependencies for github.com/opencontainers/runc

Analyze the terminal output to locate any version of Github.com/opencontainers/runc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Github.com/opencontainers/runc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

libcontainer/user/user.go in runC before 0.1.0, as used in Docker before 1.11.2, improperly treats a numeric UID as a potential username, which allows local users to gain privileges via a numeric username in the password file in a container.

CVE-2016-3697 Affected Github.com/opencontainers/runc Versions

1 component(s)
Fixed Versions:
0.1.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/opencontainers/runc
Go
< 0.1.0
0.1.0

References

Frequently Asked Questions

What is CVE-2016-3697?
CVE-2016-3697 is a security vulnerability in Github.com/opencontainers/runc involving Privilege Elevation in runc under CWE-269: Improper Privilege Management.
Which Github.com/opencontainers/runc versions are affected?
Affected versions include releases prior to 0.1.0 across affected packages: github.com/opencontainers/runc.
What version fixes CVE-2016-3697?
Upgrading to 0.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/opencontainers/runc affected?
Yes, github.com/opencontainers/runc is affected in releases prior to 0.1.0. Upgrade your dependency to 0.1.0 or later.
What is the CVSS score of CVE-2016-3697?
CVE-2016-3697 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-3697?
CVE-2016-3697 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2016-3697?
Run the dependency tree command: 'inspect dependencies for github.com/opencontainers/runc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q3j5-32m5-58c2",
  "modified" : "2024-05-20T19:40:50Z",
  "published" : "2021-12-20T18:21:34Z",
  "aliases" : [ "CVE-2016-3697" ],
  "summary" : "Privilege Elevation in runc",
  "details" : "libcontainer/user/user.go in runC before 0.1.0, as used in Docker before 1.11.2, improperly treats a numeric UID as a potential username, which allows local users to gain privileges via a numeric username in the password file in a container.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/opencontainers/runc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-3697"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/docker/docker/issues/21436"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/pull/708"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/commit/69af385de62ea68e2e608335cffbb0f4aa3db091"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opencontainers/runc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/releases/tag/v0.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://lists.opensuse.org/opensuse-updates/2016-05/msg00111.html"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0070"
  }, {
    "type" : "WEB",
    "url" : "https://rhn.redhat.com/errata/RHSA-2016-1034.html"
  }, {
    "type" : "WEB",
    "url" : "https://rhn.redhat.com/errata/RHSA-2016-2634.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201612-28"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-1034.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2634.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-20T18:53:49Z",
    "nvd_published_at" : null
  }
}