# CVE-2024-6284: Improper IPv4 and IPv6 byte order storage in github.com/google/nftables

> Incorrect byte order handling in the Go nftables library causes firewall rules to fail, potentially allowing unauthorized network access.

- **Severity:** Medium 6.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Jul 2024
- **Updated:** 8 Sep 2025
- **Also known as:** DEBIAN-CVE-2024-6284, GHSA-qjvf-8748-9w7h, GO-2024-2977, UBUNTU-CVE-2024-6284

## What is CVE-2024-6284?

CVE-2024-6284 is a medium-severity vulnerability in https://github.com/google/nftables, published on 3 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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

Weakness: CWE-1389 (Incorrect Parsing of Numbers with Different Radices), CWE-1286 (Improper Validation of Syntactic Correctness of Input)

## Which versions are affected by CVE-2024-6284?

3 open source packages ship an affected version, including github.com/google/nftables. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/google/nftables` | Go | From 0.1.0 | 0.2.0 |
| `github.com/google/nftables` | Go | From 0.1.0 | 0.2.0 |
| `github.com/google/nftables` | Go | From 0.1.0 | 0.2.0 |

Products: Google Nftables.

## How do I fix CVE-2024-6284?

Upgrade github.com/google/nftables to 0.2.0 or later.

## Is CVE-2024-6284 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6284 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-6284 and fix it if it is affected.

What it is: CVE-2024-6284 is a medium-severity vulnerability in https://github.com/google/nftables, published on 3 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-6284 exists.

Affected packages and fixed versions:
- github.com/google/nftables (Go): affected from 0.1.0; fixed in 0.2.0
- github.com/google/nftables (Go): affected from 0.1.0; fixed in 0.2.0
- github.com/google/nftables (Go): affected from 0.1.0; fixed in 0.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-6284/ (Markdown: https://insights.sbomify.com/CVE-2024-6284/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-6284
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-6284
- OSV: https://osv.dev/vulnerability/CVE-2024-6284

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-6284/
Summaries are generated and may contain mistakes; the official description above is the record.
