CVE-2019-16884: Github.com/opencontainers/runc Incorrect Authorization Vulnerability

HIGH
Advisory Identifier: GHSA-fgv8-vj5c-2ppq
CVSS 7.5
CWE-863
Published
Advisory Summary

CVE-2019-16884 is a HIGH (CVSS 7.5) incorrect authorization vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/opencontainers/runc libraries in the Go ecosystem. The issue involves incorrect authorization in runc. Remediation is available by upgrading affected packages to version 1.0.0-rc8.0.20190930145003-cad42f6e0932, 1.3.1-0.20190929122143-5215b1806f52.

CVE-2019-16884 at a Glance

CVE Identifier CVE-2019-16884
GHSA Identifier GHSA-fgv8-vj5c-2ppq
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/opencontainers/runc
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2019-16884

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: 1.0.0-rc8.0.20190930145003-cad42f6e0932
Upgrade github.com/opencontainers/runc to 1.0.0-rc8.0.20190930145003-cad42f6e0932
github.com/opencontainers/selinux fixed: 1.3.1-0.20190929122143-5215b1806f52
Upgrade github.com/opencontainers/selinux to 1.3.1-0.20190929122143-5215b1806f52
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-2019-16884, 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 1.0.0-rc8.0.20190930145003-cad42f6e0932), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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

runc through 1.0.0-rc8, as used in Docker through 19.03.2-ce and other products, allows AppArmor restriction bypass because libcontainer/rootfs_linux.go incorrectly checks mount targets, and thus a malicious Docker image can mount over a /proc directory.

CVE-2019-16884 Affected Github.com/opencontainers/runc Versions

2 component(s)
Fixed Versions:
1.0.0-rc8.0.20190930145003-cad42f6e09321.3.1-0.20190929122143-5215b1806f52
Product / Package Ecosystem Affected Versions Fixed Version
github.com/opencontainers/runc
Go
< 1.0.0-rc8.0.20190930145003-cad42f6e0932
1.0.0-rc8.0.20190930145003-cad42f6e0932
github.com/opencontainers/selinux
Go
< 1.3.1-0.20190929122143-5215b1806f52
1.3.1-0.20190929122143-5215b1806f52

References

usn.ubuntu.com/4297-1 WEB
https://usn.ubuntu.com/4297-1
NVD — CVE-2019-16884 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-16884
Github.com/opencontainers/runc Source Repository REPOSITORY
https://github.com/opencontainers/runc/issues/2128
Github.com/opencontainers/runc Source Repository REPOSITORY
https://github.com/opencontainers/runc/pull/2129
Github.com/opencontainers/runc Source Repository REPOSITORY
https://github.com/opencontainers/runc/pull/2130
Security Fix Commit FIX COMMIT
https://github.com/crosbymichael/runc/commit/78dce1cf1ec36bbe7fe6767bdb81f7cbf6d34d70
Security Fix Commit FIX COMMIT
https://github.com/opencontainers/runc/commit/cad42f6e0932db0ce08c3a3d9e89e6063ec283e4
Security Fix Commit FIX COMMIT
https://github.com/opencontainers/selinux/commit/03b517dc4fd57245b1cf506e8ba7b817b6d309da
Github.com/opencontainers/runc Security Information SECURITY
https://security.netapp.com/advisory/ntap-20220221-0004
Github.com/opencontainers/runc Security Information SECURITY
https://security.gentoo.org/glsa/202003-21
pkg.go.dev/vuln/go-2021-0085 WEB
https://pkg.go.dev/vuln/GO-2021-0085
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SPK4JWP32BUIVDJ3YODZSOEVEW6BHQCF
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DGK6IV5JGVDXHOXEKJOJWKOVNZLT6MYR
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/62OQ2P7K5YDZ5BRCH2Q6DHUJIHQD3QCD
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2023/02/msg00016.html
Github.com/opencontainers/runc Source Repository REPOSITORY
https://github.com/opencontainers/runc
access.redhat.com/errata/rhsa-2019:42... WEB
https://access.redhat.com/errata/RHSA-2019:4269
access.redhat.com/errata/rhsa-2019:40... WEB
https://access.redhat.com/errata/RHSA-2019:4074
access.redhat.com/errata/rhsa-2019:39... WEB
https://access.redhat.com/errata/RHSA-2019:3940
Github.com/opencontainers/runc Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00073.html
Github.com/opencontainers/runc Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00009.html
Github.com/opencontainers/runc Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00010.html

Frequently Asked Questions

What is CVE-2019-16884?
CVE-2019-16884 is a security vulnerability in Github.com/opencontainers/runc involving Incorrect Authorization in runc under CWE-863: Incorrect Authorization.
Which Github.com/opencontainers/runc versions are affected?
Affected versions include releases prior to 1.0.0-rc8.0.20190930145003-cad42f6e0932, 1.3.1-0.20190929122143-5215b1806f52 across affected packages: github.com/opencontainers/runc, github.com/opencontainers/selinux.
What version fixes CVE-2019-16884?
Upgrading to 1.0.0-rc8.0.20190930145003-cad42f6e0932, 1.3.1-0.20190929122143-5215b1806f52 (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 1.0.0-rc8.0.20190930145003-cad42f6e0932. Upgrade your dependency to 1.0.0-rc8.0.20190930145003-cad42f6e0932 or later.
Is github.com/opencontainers/selinux affected?
Yes, github.com/opencontainers/selinux is affected in releases prior to 1.3.1-0.20190929122143-5215b1806f52. Upgrade your dependency to 1.3.1-0.20190929122143-5215b1806f52 or later.
What is the CVSS score of CVE-2019-16884?
CVE-2019-16884 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-16884?
CVE-2019-16884 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2019-16884?
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-fgv8-vj5c-2ppq",
  "modified" : "2024-05-20T19:45:15Z",
  "published" : "2022-02-22T15:38:08Z",
  "aliases" : [ "CVE-2019-16884" ],
  "summary" : "Incorrect Authorization in runc",
  "details" : "runc through 1.0.0-rc8, as used in Docker through 19.03.2-ce and other products, allows AppArmor restriction bypass because libcontainer/rootfs_linux.go incorrectly checks mount targets, and thus a malicious Docker image can mount over a /proc directory.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/opencontainers/runc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-rc8.0.20190930145003-cad42f6e0932"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/opencontainers/selinux"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.1-0.20190929122143-5215b1806f52"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16884"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/issues/2128"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/pull/2129"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/pull/2130"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crosbymichael/runc/commit/78dce1cf1ec36bbe7fe6767bdb81f7cbf6d34d70"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/runc/commit/cad42f6e0932db0ce08c3a3d9e89e6063ec283e4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencontainers/selinux/commit/03b517dc4fd57245b1cf506e8ba7b817b6d309da"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4297-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20220221-0004"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202003-21"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0085"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SPK4JWP32BUIVDJ3YODZSOEVEW6BHQCF"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DGK6IV5JGVDXHOXEKJOJWKOVNZLT6MYR"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/62OQ2P7K5YDZ5BRCH2Q6DHUJIHQD3QCD"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/02/msg00016.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opencontainers/runc"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:4269"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:4074"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3940"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00073.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00009.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00010.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-02-22T15:38:08Z",
    "nvd_published_at" : "2019-09-25T18:15:00Z"
  }
}