CVE-2024-34360: Github.com/spacemeshos/go spacemesh Previous ATX Is Not Checked Vulnerability
HIGHCVE-2024-34360 is a HIGH (CVSS 8.2) previous atx is not checked vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Github.com/spacemeshos/go spacemesh libraries in the Go ecosystem. The issue involves previous atx is not checked to be the newest valid atx by smesher when validating incoming atx. Remediation is available by upgrading affected packages to version 1.5.2-hotfix1, 1.37.1.
CVE-2024-34360 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2024-34360
To remediate this vulnerability, upgrade all affected Github.com/spacemeshos/go spacemesh 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/spacemeshos/go-spacemesh to 1.5.2-hotfix1
Upgrade github.com/spacemeshos/api to 1.37.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/spacemeshos/go-spacemesh
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-34360, inspect your project dependencies for Github.com/spacemeshos/go spacemesh:
inspect dependencies for github.com/spacemeshos/go-spacemesh
Analyze the terminal output to locate any version of Github.com/spacemeshos/go spacemesh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.2-hotfix1), 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-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In Github.com/spacemeshos/go spacemesh, 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-2024-34360 Affected Github.com/spacemeshos/go spacemesh Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/spacemeshos/go-spacemesh
|
Go |
< 1.5.2-hotfix1
|
1.5.2-hotfix1
|
|
github.com/spacemeshos/api
|
Go |
< 1.37.1
|
1.37.1
|
References
Frequently Asked Questions
What is CVE-2024-34360?
Which Github.com/spacemeshos/go spacemesh versions are affected?
What version fixes CVE-2024-34360?
Is github.com/spacemeshos/go-spacemesh affected?
Is github.com/spacemeshos/api affected?
What is the CVSS score of CVE-2024-34360?
What CWE is associated with CVE-2024-34360?
How can I check Go dependencies for CVE-2024-34360?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jcqq-g64v-gcm7",
"modified" : "2024-05-14T19:54:27Z",
"published" : "2024-05-10T15:33:40Z",
"aliases" : [ "CVE-2024-34360" ],
"summary" : "Previous ATX is not checked to be the newest valid ATX by Smesher when validating incoming ATX",
"details" : "### Impact\nNodes can publish ATXs which reference the incorrect previous ATX of the Smesher that created the ATX. ATXs are expected to form a single chain from the newest to the first ATX ever published by an identity. Allowing Smeshers to reference an earlier (but not the latest) ATX as previous breaks this protocol rule and can serve as an attack vector where Nodes are rewarded for holding their PoST data for less than one epoch but still being eligible for rewards.\n\n### Patches\n- API needs to be extended to be able to fetch events from a node that dected malicious behavior of this regard by the node\n- go-spacemesh needs to be patched to a) not allow publishing these ATXs any more and b) create malfeasance proofs for identities that published invalid ATXs in the past.\n\n### Workarounds\nn/a\n\n### References\nSpacemesh protocol whitepaper: https://spacemesh.io/blog/spacemesh-white-paper-1/, specifically sections 4.4.2 (\"ATX Contents\") and 4.4.3 (\"ATX validity\")",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spacemeshos/go-spacemesh"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.2-hotfix1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spacemeshos/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.37.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/spacemeshos/go-spacemesh/security/advisories/GHSA-jcqq-g64v-gcm7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34360"
}, {
"type" : "WEB",
"url" : "https://github.com/spacemeshos/api/commit/1d5bd972bbe225d024c3e0ae5214ddb6b481716e"
}, {
"type" : "WEB",
"url" : "https://github.com/spacemeshos/go-spacemesh/commit/9aff88d54be809ac43d60e8a8b4d65359c356b87"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spacemeshos/go-spacemesh"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2831"
}, {
"type" : "WEB",
"url" : "https://spacemesh.io/blog/spacemesh-white-paper-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-754" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-10T15:33:40Z",
"nvd_published_at" : "2024-05-14T15:38:45Z"
}
}