VYPR
High severity7.1GHSA Advisory· Published May 29, 2026· Updated May 29, 2026

CC-Tweaked has an SSRF Protection Bypass with NAT64

CVE-2026-47695

Description

Summary

CC-Tweaked's HTTP API (http.request, http.websocket) blocks requests to private network ranges to prevent server-side request forgery (SSRF). This protection can be bypassed on IPv6-capable servers using NAT64 well-known prefix addresses (64:ff9b::/96). An attacker who can execute Lua code can reach any internal IPv4 service that the filter is intended to block, by addressing it as http://[64:ff9b::]/ instead of its direct IPv4 address. This affects any CC-Tweaked deployment on a network with NAT64 routing — a configuration that is standard on AWS, GCP, and other cloud platforms when using IPv6-only subnets.

Details

The IP filter in `PrivatePattern.matches()` (AddressPredicate.java#L121–L130) blocks private network ranges by calling Java's standard InetAddress classification methods:

public boolean matches(InetAddress socketAddress) {
    return socketAddress.isAnyLocalAddress()
        || socketAddress.isLoopbackAddress()
        || socketAddress.isLinkLocalAddress()
        || socketAddress.isSiteLocalAddress()
        || socketAddress.isMulticastAddress()
        || isUniqueLocalAddress(socketAddress)
        || isCarrierGradeNatAddress(socketAddress)
        || additionalAddresses.contains(socketAddress);
}

When a NAT64 address such as 64:ff9b::c0a8:0101 (encoding 192.168.1.1) is resolved via new InetSocketAddress("64:ff9b::c0a8:0101", 80), Java returns an Inet6Address. Every method above returns false for this address — the 64:ff9b::/96 prefix is not recognised by any of Java's built-in classification methods. The address passes the filter and CC-Tweaked opens a connection.

On a network with a 64:ff9b::/96 → NAT Gateway route, that connection is translated at the network level: the embedded IPv4 address is extracted and the packet is forwarded to 192.168.1.1:80. The internal service receives a normal IPv4 TCP connection.

The existing 6to4 (2002::/16) mitigation in `AddressRule.java#L74–L75` does not cover the NAT64 prefix. No other check catches 64:ff9b::/96.

PoC

Preconditions (all three required): 1. The server running CC-Tweaked has an IPv6 address assigned 2. The network has a NAT Gateway (or equivalent) 3. The route table contains 64:ff9b::/96 → NAT Gateway — the standard AWS/GCP configuration for IPv6-only subnets with outbound IPv4 access (AWS documentation)

Lua payload (targets an internal service at 10.0.1.17:8888): ``lua -- 10.0.1.17 = 0x0a000111, expressed as NAT64: 64:ff9b::0a00:0111 local res = http.request("http://[64:ff9b::0a00:0111]:8888/") if res then print(res.readAll()) end ``

Conversion formula — for any blocked IPv4 a.b.c.d, the bypass address is: `` 64:ff9b::<hex(a)><hex(b)>:<hex(c)><hex(d)> ``

Impact

This is a server-side request forgery (SSRF) vulnerability. Any user able to execute Lua code on a CC-Tweaked computer — including players on a public server — can use it to send HTTP requests to internal IPv4 services that the HTTP filter is designed to block. On cloud-hosted servers (AWS, GCP, Azure) using IPv6-only subnets with NAT64, which is an increasingly common configuration following AWS's February 2024 public IPv4 pricing change, this includes other instances in the VPC, internal databases, and cloud management APIs.

Suggested fix: add a check for the NAT64 well-known prefix in `PrivatePattern.matches()`:

|| isNAT64Address(socketAddress)

private boolean isNAT64Address(InetAddress address) {
    if (!(address instanceof Inet6Address)) return false;
    byte[] b = address.getAddress();
    // 64:ff9b::/96 — NAT64 well-known prefix (RFC 6052)
    return b[0] == 0x00 && b[1] == 0x64 &&
           b[2] == (byte) 0xff && b[3] == (byte) 0x9b &&
           b[4] == 0 && b[5] == 0 && b[6] == 0 && b[7] == 0 &&
           b[8] == 0 && b[9] == 0 && b[10] == 0 && b[11] == 0;
}

This vulnerability does not seem to work on servers running on modern versions of MacOS.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CC-Tweaked HTTP API SSRF filter can be bypassed via NAT64 well-known prefix addresses, allowing attackers to reach internal IPv4 services on cloud networks.

Vulnerability

The CC-Tweaked HTTP API's private network filter in PrivatePattern.matches() fails to detect NAT64 well-known prefix addresses (64:ff9b::/96). When an address like 64:ff9b::c0a8:0101 (encoding 192.168.1.1) is resolved, Java's Inet6Address classification methods all return false, allowing the address to pass the filter. This affects all versions of CC-Tweaked prior to the fix, on any network with NAT64 routing (standard on AWS, GCP, and other cloud platforms with IPv6-only subnets). [1][2]

Exploitation

An attacker who can execute Lua code on a CC-Tweaked computer sends a request to http://[64:ff9b::]/ instead of the direct IPv4 address. On a network with a 64:ff9b::/96 → NAT Gateway route, the connection is translated at the network level: the embedded IPv4 address is extracted and the packet is forwarded to the internal IPv4 service. The attacker needs no additional authentication or network position beyond Lua execution capability. [1][2]

Impact

Successful exploitation allows the attacker to reach any internal IPv4 service that the filter is intended to block (e.g., internal web servers, databases, cloud metadata endpoints). This is a server-side request forgery (SSRF) bypass that can lead to information disclosure, privilege escalation, or further compromise of internal systems. The attacker gains network-level access to the internal IPv4 service, potentially beyond what is intended. [1][2]

Mitigation

The fix is included in CC-Tweaked version 1.113.0, released on 2025-08-04. Users should upgrade to this version or later. There is no workaround for unpatched versions; the 64:ff9b::/96 prefix is not covered by any existing filter. For deployments on cloud platforms with NAT64, updating is critical. The vendor has coordinated with GitHub Advisory Database (GHSA-5jh9-2h63-pw4q). [1][2]

AI Insight generated on May 29, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

10

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"The IP filter does not check for the NAT64 well-known prefix 64:ff9b::/96, so Java's InetAddress classification methods all return false for these addresses, allowing them to bypass the private-range block."

Attack vector

An attacker who can execute Lua code on a CC-Tweaked computer crafts an HTTP request to a NAT64 address that encodes a private IPv4 address, e.g. `http://[64:ff9b::0a00:0111]:8888/` for `10.0.1.17:8888` [ref_id=1][ref_id=2]. Java's `InetAddress` methods classify this `Inet6Address` as non-private, so the filter passes it and CC-Tweaked opens a connection. On a network with a `64:ff9b::/96 → NAT Gateway` route (standard on AWS/GCP IPv6-only subnets), the gateway extracts the embedded IPv4 and forwards the packet to the internal service, bypassing the SSRF protection [ref_id=1][ref_id=2].

Affected code

The IP filter in `PrivatePattern.matches()` (`AddressPredicate.java#L121–L130`) relies on Java's `InetAddress` classification methods, none of which recognize the NAT64 well-known prefix `64:ff9b::/96`. The existing 6to4 (`2002::/16`) mitigation in `AddressRule.java#L74–L75` does not cover this prefix, and no other check catches it [ref_id=1][ref_id=2].

What the fix does

The advisory recommends adding an `isNAT64Address` check to `PrivatePattern.matches()` that inspects the raw bytes of an `Inet6Address` for the `64:ff9b::/96` prefix (RFC 6052) [ref_id=1][ref_id=2]. This would cause the filter to reject any address in that range, preventing the SSRF bypass. No patch has been published at the time of the advisory.

Preconditions

  • configThe server running CC-Tweaked has an IPv6 address assigned
  • networkThe network has a NAT Gateway (or equivalent)
  • networkThe route table contains 64:ff9b::/96 → NAT Gateway (standard AWS/GCP configuration for IPv6-only subnets)
  • authThe attacker can execute Lua code on a CC-Tweaked computer

Reproduction

**Preconditions** (all three required): 1. The server running CC-Tweaked has an IPv6 address assigned 2. The network has a NAT Gateway (or equivalent) 3. The route table contains `64:ff9b::/96 → NAT Gateway` — the standard AWS/GCP configuration for IPv6-only subnets with outbound IPv4 access

**Lua payload** (targets an internal service at `10.0.1.17:8888`): ```lua -- 10.0.1.17 = 0x0a000111, expressed as NAT64: 64:ff9b::0a00:0111 local res = http.request("http://[64:ff9b::0a00:0111]:8888/") if res then print(res.readAll()) end ```

**Conversion formula** — for any blocked IPv4 `a.b.c.d`, the bypass address is: ``` 64:ff9b::<hex(a)><hex(b)>:<hex(c)><hex(d)> ``` [ref_id=1][ref_id=2]

Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.