CVE-2021-27098: Github.com/spiffe/spire Legacy Node API Allows Impersonation Vulnerability
HIGHCVE-2021-27098 is a HIGH (CVSS 8.1) legacy node api allows impersonation vulnerability (CWE-284: Improper Access Control) affecting Github.com/spiffe/spire libraries in the Go ecosystem. The issue involves legacy node api allows impersonation in github.com/spiffe/spire/pkg/server/endpoints/node. Remediation is available by upgrading affected packages to version 0.8.5, 0.9.4, 0.10.2, 0.11.3, 0.12.1.
CVE-2021-27098 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2021-27098
To remediate this vulnerability, upgrade all affected Github.com/spiffe/spire 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/spiffe/spire to 0.8.5
Upgrade github.com/spiffe/spire to 0.9.4
Upgrade github.com/spiffe/spire to 0.10.2
Upgrade github.com/spiffe/spire to 0.11.3
Upgrade github.com/spiffe/spire to 0.12.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/spiffe/spire
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-27098, inspect your project dependencies for Github.com/spiffe/spire:
inspect dependencies for github.com/spiffe/spire
Analyze the terminal output to locate any version of Github.com/spiffe/spire in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Github.com/spiffe/spire, 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-27098 Affected Github.com/spiffe/spire Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/spiffe/spire
|
Go |
≥ 0.8.1
< 0.8.5
|
0.8.5
|
|
github.com/spiffe/spire
|
Go |
≥ 0.9.0
< 0.9.4
|
0.9.4
|
|
github.com/spiffe/spire
|
Go |
≥ 0.10.0
< 0.10.2
|
0.10.2
|
|
github.com/spiffe/spire
|
Go |
≥ 0.11.0
< 0.11.3
|
0.11.3
|
|
github.com/spiffe/spire
|
Go |
≥ 0.12.0
< 0.12.1
|
0.12.1
|
References
Frequently Asked Questions
What is CVE-2021-27098?
Which Github.com/spiffe/spire versions are affected?
What version fixes CVE-2021-27098?
Is github.com/spiffe/spire affected?
What is the CVSS score of CVE-2021-27098?
What CWE is associated with CVE-2021-27098?
How can I check Go dependencies for CVE-2021-27098?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h746-rm5q-8mgq",
"modified" : "2023-10-02T12:04:37Z",
"published" : "2021-05-21T14:31:11Z",
"aliases" : [ "CVE-2021-27098" ],
"summary" : "Legacy Node API Allows Impersonation in github.com/spiffe/spire/pkg/server/endpoints/node",
"details" : "#### Summary\nIn SPIRE 0.8.1 through 0.8.4 and before versions 0.9.4, 0.10.2, 0.11.3 and 0.12.1, specially crafted requests to the FetchX509SVID RPC of SPIRE Server’s Legacy Node API (github.com/spiffe/spire/pkg/server/endpoints/node) can result in the possible issuance of an X.509 certificate with a URI SAN for a SPIFFE ID that the agent is not authorized to distribute. Proper controls are in place to require that the caller presents a valid agent certificate that is already authorized to issue at least one SPIFFE ID, and the requested SPIFFE ID belongs to the same trust domain, prior to being able to trigger this vulnerability. This issue has been fixed in SPIRE versions 0.8.5, 0.9.4, 0.10.2, 0.11.3 and 0.12.1.\n\n#### What are the changes introduced by the patched versions?\nThe changes introduced to address this issue are related to enforcing that the FetchX509SVID RPC of SPIRE Server’s Legacy Node API only issues X.509 certificates with SPIFFE IDs that the agent is authorized to distribute.\n\nThe patched version also includes a back-ported change that improves the handling of file descriptors related to workload attestation in SPIRE Agent.\n\nThere are no changes in the expected behavior of SPIRE.\n\n#### Should I upgrade SPIRE?\nAll SPIRE users running affected versions are advised to upgrade to the corresponding patched version.\n\n#### Workarounds\nNo workarounds have been identified for this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.1"
}, {
"fixed" : "0.8.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.9.0"
}, {
"fixed" : "0.9.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.10.0"
}, {
"fixed" : "0.10.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.11.0"
}, {
"fixed" : "0.11.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.12.0"
}, {
"fixed" : "0.12.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/spiffe/spire/security/advisories/GHSA-h746-rm5q-8mgq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-27098"
}, {
"type" : "WEB",
"url" : "https://github.com/spiffe/spire/commit/3c5115b57afc20a0a2c2b1b9dd60dd1fd9082e13"
}, {
"type" : "WEB",
"url" : "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27098"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284", "CWE-295" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T14:28:38Z",
"nvd_published_at" : null
}
}