CVE-2024-6284: Github.com/google/nftables Github.com/google/nftable IP Addresses Were Encoded Vulnerability

MODERATE
Advisory Identifier: GHSA-qjvf-8748-9w7h
CVSS 5.6
CWE-20 CWE-1286
Published
Advisory Summary

CVE-2024-6284 is a MODERATE (CVSS 5.6) github.com/google/nftable ip addresses were encoded vulnerability (CWE-20: Improper Input Validation) affecting Github.com/google/nftables libraries in the Go ecosystem. The issue involves github.com/google/nftable ip addresses were encoded in the wrong byte order. Remediation is available by upgrading affected packages to version 0.2.0.

CVE-2024-6284 at a Glance

CVE Identifier CVE-2024-6284
GHSA Identifier GHSA-qjvf-8748-9w7h
Severity MODERATE
CVSS v3.1 Base Score 5.6
CWE Classification CWE-20: Improper Input Validation
Affected Product Github.com/google/nftables
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-6284

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

github.com/google/nftables fixed: 0.2.0
Upgrade github.com/google/nftables to 0.2.0
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 github.com/google/nftables

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-6284, inspect your project dependencies for Github.com/google/nftables:

inspect dependencies for github.com/google/nftables

Analyze the terminal output to locate any version of Github.com/google/nftables in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.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/nftables, 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

In https://github.com/google/nftables IP addresses were encoded in the wrong byte order, resulting in an nftables configuration which does not work as intended (might block or not block the desired addresses). This issue affects:  https://pkg.go.dev/github.com/google/nftables@v0.1.0 The bug was fixed in the next released version:  https://pkg.go.dev/github.com/google/nftables@v0.2.0

CVE-2024-6284 Affected Github.com/google/nftables Versions

1 component(s)
Fixed Versions:
0.2.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/google/nftables
Go
≥ 0.1.0
< 0.2.0
0.2.0

References

Frequently Asked Questions

What is CVE-2024-6284?
CVE-2024-6284 is a security vulnerability in Github.com/google/nftables involving github.com/google/nftable IP addresses were encoded in the wrong byte order under CWE-20: Improper Input Validation.
Which Github.com/google/nftables versions are affected?
Affected versions include releases prior to 0.2.0 across affected packages: github.com/google/nftables.
What version fixes CVE-2024-6284?
Upgrading to 0.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/google/nftables affected?
Yes, github.com/google/nftables is affected in releases prior to 0.2.0. Upgrade your dependency to 0.2.0 or later.
What is the CVSS score of CVE-2024-6284?
CVE-2024-6284 has a CVSS v3.1 base score of 5.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-6284?
CVE-2024-6284 is classified under CWE-20: Improper Input Validation (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.).
How can I check Go dependencies for CVE-2024-6284?
Run the dependency tree command: 'inspect dependencies for github.com/google/nftables'. 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-qjvf-8748-9w7h",
  "modified" : "2025-09-10T20:52:22Z",
  "published" : "2024-07-04T00:37:45Z",
  "aliases" : [ "CVE-2024-6284" ],
  "summary" : "github.com/google/nftable IP addresses were encoded in the wrong byte order",
  "details" : "In  https://github.com/google/nftables IP addresses were encoded in the wrong byte order, resulting in an nftables configuration which does not work as intended (might block or not block the desired addresses).\n\nThis issue affects:  https://pkg.go.dev/github.com/google/nftables@v0.1.0 \n\nThe bug was fixed in the next released version:  https://pkg.go.dev/github.com/google/nftables@v0.2.0",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/google/nftables"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.1.0"
      }, {
        "fixed" : "0.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6284"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crowdsecurity/cs-firewall-bouncer/issues/368"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/nftables/issues/225"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/nftables/commit/b1f901b05510bed05c232c5049f68d1511b56a19"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/ubuntu/+source/crowdsec-firewall-bouncer/+bug/2069596"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/google/nftables"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1286", "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-05T20:05:15Z",
    "nvd_published_at" : "2024-07-03T23:15:02Z"
  }
}