CVE-2023-28642: Github.com/opencontainers/runc Runc AppArmor Bypass With Symlinked Vulnerability
MODERATECVE-2023-28642 is a MODERATE (CVSS 6.1) runc apparmor bypass with symlinked vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Github.com/opencontainers/runc libraries in the Go ecosystem. The issue involves runc apparmor bypass with symlinked /proc. Remediation is available by upgrading affected packages to version 1.1.5.
CVE-2023-28642 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L).
How to Fix CVE-2023-28642
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.
Upgrade github.com/opencontainers/runc to 1.1.5
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-2023-28642, 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.1.5), 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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. 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
CVE-2023-28642 Affected Github.com/opencontainers/runc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/opencontainers/runc
|
Go |
< 1.1.5
|
1.1.5
|
References
Frequently Asked Questions
What is CVE-2023-28642?
Which Github.com/opencontainers/runc versions are affected?
What version fixes CVE-2023-28642?
Is github.com/opencontainers/runc affected?
What is the CVSS score of CVE-2023-28642?
What CWE is associated with CVE-2023-28642?
How can I check Go dependencies for CVE-2023-28642?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g2j6-57v7-gm8c",
"modified" : "2024-12-06T15:31:17Z",
"published" : "2023-03-30T20:20:23Z",
"aliases" : [ "CVE-2023-28642" ],
"summary" : "runc AppArmor bypass with symlinked /proc",
"details" : "### Impact\nIt was found that AppArmor, and potentially SELinux, can be bypassed when `/proc` inside the container is symlinked with a specific mount configuration.\n\n### Patches\nFixed in runc v1.1.5, by prohibiting symlinked `/proc`: https://github.com/opencontainers/runc/pull/3785\n\nThis PR fixes CVE-2023-27561 as well.\n\n### Workarounds\nAvoid using an untrusted container image.\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/opencontainers/runc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opencontainers/runc/security/advisories/GHSA-g2j6-57v7-gm8c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28642"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/runc/pull/3785"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/opencontainers/runc"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20241206-0005"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-281", "CWE-59" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-30T20:20:23Z",
"nvd_published_at" : "2023-03-29T19:15:00Z"
}
}