CVE-2022-0317: Github.com/google/go attestation Go-Attestation Improper Input Validation With Vulnerability
MODERATECVE-2022-0317 is a MODERATE (CVSS 4.0) go-attestation improper input validation with vulnerability (CWE-20: Improper Input Validation) affecting Github.com/google/go attestation libraries in the Go ecosystem. The issue involves go-attestation improper input validation with attacker-controlled tpm quote. Remediation is available by upgrading affected packages to version 0.4.0.
CVE-2022-0317 at a Glance
Security Impact
CVSS: 4.0
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:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2022-0317
To remediate this vulnerability, upgrade all affected Github.com/google/go attestation 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/google/go-attestation to 0.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/google/go-attestation
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-0317, inspect your project dependencies for Github.com/google/go attestation:
inspect dependencies for github.com/google/go-attestation
Analyze the terminal output to locate any version of Github.com/google/go attestation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/google/go attestation, 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-2022-0317 Affected Github.com/google/go attestation Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/google/go-attestation
|
Go |
< 0.4.0
|
0.4.0
|
References
Frequently Asked Questions
What is CVE-2022-0317?
Which Github.com/google/go attestation versions are affected?
What version fixes CVE-2022-0317?
Is github.com/google/go-attestation affected?
What is the CVSS score of CVE-2022-0317?
What CWE is associated with CVE-2022-0317?
How can I check Go dependencies for CVE-2022-0317?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-99cg-575x-774p",
"modified" : "2023-08-29T20:29:19Z",
"published" : "2022-02-01T00:43:17Z",
"aliases" : [ "CVE-2022-0317" ],
"summary" : "Go-Attestation Improper Input Validation with attacker-controlled TPM Quote",
"details" : "### Impact\n\nAn improper input validation vulnerability in go-attestation before 0.4.0 allows local users to provide a maliciously-formed Quote over no/some PCRs, causing `AKPublic.Verify` to succeed despite the inconsistency. Subsequent use of the same set of PCR values in `Eventlog.Verify` lacks the authentication performed by quote verification, meaning a local attacker could couple this vulnerability with a maliciously-crafted TCG log in `Eventlog.Verify` to spoof events in the TCG log, hence defeating remotely-attested measured-boot.\n\n### Patches\nThis issue is resolved in version 0.4.0. If your usage of this library verifies PCRs using multiple quotes, make sure to use the new method `AKPublic.VerifyAll()` instead of `AKPublic.Verify`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/google/go-attestation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/google/go-attestation/security/advisories/GHSA-99cg-575x-774p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0317"
}, {
"type" : "WEB",
"url" : "https://github.com/google/go-attestation/commit/82f2c9c2c76e1d3691d17ee78116d1d93a123788"
}, {
"type" : "WEB",
"url" : "https://github.com/google/go-attestation"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0294"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-31T22:15:30Z",
"nvd_published_at" : "2022-02-04T23:15:00Z"
}
}