GHSA-r9rv-9mh8-pxf4: Ckb Nervos CKB BlockTimeTooNew Should Not Vulnerability

MODERATE
Published
Advisory Summary

GHSA-r9rv-9mh8-pxf4 is a MODERATE nervos ckb blocktimetoonew should not vulnerability (General Security Weakness) affecting Ckb libraries in the crates.io ecosystem. The issue involves nervos ckb blocktimetoonew should not be considered as invalid block. Remediation is available by upgrading affected packages to version 0.33.1.

GHSA-r9rv-9mh8-pxf4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r9rv-9mh8-pxf4
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Ckb
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-r9rv-9mh8-pxf4

To remediate this vulnerability, upgrade all affected Ckb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ckb fixed: 0.33.1
Upgrade ckb to 0.33.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ckb

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r9rv-9mh8-pxf4, inspect your project dependencies for Ckb:

inspect dependencies for ckb

Analyze the terminal output to locate any version of Ckb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.33.1), 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 General Security Weakness. In Ckb, 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

### Impact Currently, when a node receives a block in future according to its local wall clock, it will mark the block as invalid and ban the peer. If the header's timestamp is more than 15 seconds ahead of our current time. In that case, the header may become valid in the future, and we don't want to disconnect a peer merely for serving us one too-far-ahead block header, to prevent an attacker from splitting the network by mining a block right at the 15 seconds boundary. ### Patches Upgrade to v0.33.1 or above. ### Workarounds Don't ban peer serving too-far-ahead block header.

GHSA-r9rv-9mh8-pxf4 Affected Ckb Versions

1 component(s)
Fixed Versions:
0.33.1
Product / Package Ecosystem Affected Versions Fixed Version
ckb
crates.io
< 0.33.1
0.33.1

References

Frequently Asked Questions

What is GHSA-r9rv-9mh8-pxf4?
GHSA-r9rv-9mh8-pxf4 is a security vulnerability in Ckb involving Nervos CKB BlockTimeTooNew should not be considered as invalid block under General Security Weakness.
Which Ckb versions are affected?
Affected versions include releases prior to 0.33.1 across affected packages: ckb.
What version fixes GHSA-r9rv-9mh8-pxf4?
Upgrading to 0.33.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ckb affected?
Yes, ckb is affected in releases prior to 0.33.1. Upgrade your dependency to 0.33.1 or later.
What CWE is associated with GHSA-r9rv-9mh8-pxf4?
GHSA-r9rv-9mh8-pxf4 is classified under General Security Weakness.
How can I check crates.io dependencies for GHSA-r9rv-9mh8-pxf4?
Run the dependency tree command: 'inspect dependencies for ckb'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r9rv-9mh8-pxf4",
  "modified" : "2024-02-02T22:23:07Z",
  "published" : "2024-02-02T22:23:07Z",
  "aliases" : [ ],
  "summary" : "Nervos CKB BlockTimeTooNew should not be considered as invalid block",
  "details" : "### Impact\n\nCurrently, when a node receives a block in future according to its local wall clock, it will mark the block as invalid and ban the peer. \n\nIf the header's timestamp is more than 15 seconds ahead of our current time. In that case, the header may become valid in the future, and we don't want to disconnect a peer merely for serving us one too-far-ahead block header, to prevent an attacker from splitting the network by mining a block right at the  15 seconds boundary.\n\n### Patches\n\nUpgrade to v0.33.1 or above.\n\n### Workarounds\nDon't ban peer serving too-far-ahead block header.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "ckb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.33.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.33.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nervosnetwork/ckb/security/advisories/GHSA-r9rv-9mh8-pxf4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nervosnetwork/ckb/commit/760d447c8b600df0539debe80b1625836fc72819"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-02T22:23:07Z",
    "nvd_published_at" : null
  }
}