CVE-2021-41087: Github.com/in toto/in toto golang Improperly Implemented Path Matching For Vulnerability
MODERATECVE-2021-41087 is a MODERATE (CVSS 5.6) improperly implemented path matching for vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Github.com/in toto/in toto golang libraries in the Go ecosystem. The issue involves improperly implemented path matching for in-toto-golang. Remediation is available by upgrading affected packages to version 0.3.0.
CVE-2021-41087 at a Glance
Security Impact
CVSS: 5.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N).
How to Fix CVE-2021-41087
To remediate this vulnerability, upgrade all affected Github.com/in toto/in toto golang 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/in-toto/in-toto-golang to 0.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/in-toto/in-toto-golang
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-41087, inspect your project dependencies for Github.com/in toto/in toto golang:
inspect dependencies for github.com/in-toto/in-toto-golang
Analyze the terminal output to locate any version of Github.com/in toto/in toto golang in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.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-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Github.com/in toto/in toto golang, 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-2021-41087 Affected Github.com/in toto/in toto golang Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/in-toto/in-toto-golang
|
Go |
< 0.3.0
|
0.3.0
|
References
Frequently Asked Questions
What is CVE-2021-41087?
Which Github.com/in toto/in toto golang versions are affected?
What version fixes CVE-2021-41087?
Is github.com/in-toto/in-toto-golang affected?
What is the CVSS score of CVE-2021-41087?
What CWE is associated with CVE-2021-41087?
How can I check Go dependencies for CVE-2021-41087?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vrxp-mg9f-hwf3",
"modified" : "2021-09-21T21:51:18Z",
"published" : "2021-09-22T20:37:09Z",
"aliases" : [ "CVE-2021-41087" ],
"summary" : "Improperly Implemented path matching for in-toto-golang",
"details" : "### Impact\nAuthenticated attackers posing as functionaries (i.e., within a trusted set of users for a layout) are able to create attestations that may bypass DISALLOW rules in the same layout. An attacker with access to trusted private keys, may issue an attestation that contains a disallowed artifact by including path traversal semantics (e.g., foo vs dir/../foo).\n\n### Patches\nThe problem has been fixed in version 0.3.0.\n\n### Workarounds\nExploiting this vulnerability is dependent on the specific policy applied.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [in-toto-golang](http://github.com/in-toto/in-toto-golang)\n* Email us at [in-toto-public](mailto:in-toto-public@googlegroups.com)\n* If this is a sensitive security-relevant disclosure, please send a PGP encrypted email to santiagotorres@purdue.edu or jcappos@nyu.edu\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/in-toto/in-toto-golang"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.2.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/in-toto/in-toto-golang/security/advisories/GHSA-vrxp-mg9f-hwf3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41087"
}, {
"type" : "WEB",
"url" : "https://github.com/in-toto/in-toto-golang/commit/f2c57d1e0f15e3ffbeac531829c696b72ecc4290"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/in-toto/in-toto-golang"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-345" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-21T21:51:18Z",
"nvd_published_at" : "2021-09-21T21:15:00Z"
}
}