CVE-2023-0778: Github.com/containers/podman/v4 Podman Time-of-check Time-of-use (TOCTOU) Race Vulnerability
MODERATECVE-2023-0778 is a MODERATE (CVSS 6.8) podman time-of-check time-of-use (toctou) race vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Github.com/containers/podman/v4 libraries in the Go ecosystem. The issue involves podman time-of-check time-of-use (toctou) race condition. Remediation is available by upgrading affected packages to version 4.4.2.
CVE-2023-0778 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2023-0778
To remediate this vulnerability, upgrade all affected Github.com/containers/podman/v4 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/containers/podman/v4 to 4.4.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/containers/podman/v4
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-0778, inspect your project dependencies for Github.com/containers/podman/v4:
inspect dependencies for github.com/containers/podman/v4
Analyze the terminal output to locate any version of Github.com/containers/podman/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.2), 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-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Github.com/containers/podman/v4, 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-0778 Affected Github.com/containers/podman/v4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/containers/podman/v4
|
Go |
< 4.4.2
|
4.4.2
|
References
Frequently Asked Questions
What is CVE-2023-0778?
Which Github.com/containers/podman/v4 versions are affected?
What version fixes CVE-2023-0778?
Is github.com/containers/podman/v4 affected?
What is the CVSS score of CVE-2023-0778?
What CWE is associated with CVE-2023-0778?
How can I check Go dependencies for CVE-2023-0778?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qwqv-rqgf-8qh8",
"modified" : "2024-05-20T21:50:04Z",
"published" : "2023-03-27T21:30:26Z",
"aliases" : [ "CVE-2023-0778" ],
"summary" : "Podman Time-of-check Time-of-use (TOCTOU) Race Condition",
"details" : "A Time-of-check Time-of-use (TOCTOU) flaw was found in podman. This issue may allow a malicious user to replace a normal file in a volume with a symlink while exporting the volume, allowing for access to arbitrary files on the host file system.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/containers/podman/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-0778"
}, {
"type" : "WEB",
"url" : "https://github.com/containers/podman/pull/17528"
}, {
"type" : "WEB",
"url" : "https://github.com/containers/podman/pull/17532"
}, {
"type" : "WEB",
"url" : "https://github.com/containers/podman/commit/6ca857feb07a5fdc96fd947afef03916291673d8"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2023-0778"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2168256"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/containers/podman"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2023-1681"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-27T22:33:20Z",
"nvd_published_at" : "2023-03-27T21:15:00Z"
}
}