CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-84G5-X8J3-7235

GHSA-84G5-X8J3-7235: DNS Filter Bypass via Off-by-one Error in Netfoil Suffix Trie

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 30, 2026·5 min read·26 visits

Executive Summary (TL;DR)

An off-by-one error in Netfoil's domain matching logic ignores the first character of incoming domains, allowing attackers to bypass DNS filters by adding a prefix to allowed domains.

Netfoil versions prior to v0.2.1 contain an off-by-one logic error within the custom suffix trie implementation used for domain matching. This flaw allows an attacker to bypass DNS allowlist configurations by prepending arbitrary characters to approved domain names.

Vulnerability Overview

Netfoil acts as a DNS proxy with built-in filtering capabilities. It relies on a custom suffix trie data structure to manage allowed and denied domains. The vulnerability resides in this custom implementation, specifically within the insertion and exact match logic responsible for enforcing security policies.

The flaw is classified as an off-by-one error (CWE-193), which directly leads to improper authorization (CWE-285). Because the proxy relies entirely on this suffix trie to enforce access policies, a flaw in the matching logic invalidates the primary security boundary of the application.

Any attacker capable of routing DNS requests through the vulnerable Netfoil instance can exploit this flaw. By manipulating the requested domain string, the attacker forces the proxy to process unauthorized domains as if they were present on the configured allowlist.

Root Cause Analysis

The root cause is a loop termination condition error within the suffixtrie/suffixtrie.go module. The application implements its own suffix trie to handle domain lookups. To process strings from right to left (TLD to subdomain), the functions Insert and MatchExact iterate backward over the byte slice of the provided domain string.

The for loop governing this backward traversal uses the condition i > 0. Because Go employs zero-based indexing, this condition dictates that the loop terminates immediately after processing the character at index 1. Consequently, the character at index 0—the first character of the string—is consistently omitted from both the insertion and matching operations.

When the system administrator adds example.com to the allowlist, the Insert function only records xample.com within the trie nodes. Subsequently, when the MatchExact function processes an incoming request for fxample.com, it also drops the leading character and evaluates xample.com. The resulting match allows the unauthorized domain to bypass the filter.

A secondary logic error existed in the MatchSuffix function. This function returned true when evaluated against an empty byte slice. Depending on prior input sanitization stages, this flaw facilitates further filter bypasses by exploiting null or empty domain queries.

Code Analysis

The underlying flaw is evident when examining the pre-patch state of the suffixtrie.go source file. The backward iteration logic failed to account for the zeroth index.

// VULNERABLE CODE: suffixtrie.go
func (t *Trie) Insert(word []byte) {
    // ...
    for i := len(word) - 1; i > 0; i-- { // Flaw: i > 0 ignores index 0
        c := word[i]
        // node traversal logic
    }
}

The fix applied in commit 0ca054acf97b011e4fdd40392475c7786b975ec3 corrects the loop boundaries. The condition is updated to i >= 0, ensuring the complete byte slice is processed.

// PATCHED CODE: suffixtrie.go
func (t *Trie) Insert(word []byte) {
    // ...
    for i := len(word) - 1; i >= 0; i-- { // Fix: includes index 0
        c := word[i]
        // node traversal logic
    }
}

The patch also hardens the MatchSuffix method. A guard clause is introduced to explicitly return false if the length of the input word is zero, neutralizing the secondary bypass vector.

// PATCHED CODE: suffixtrie.go (MatchSuffix)
func (t *Trie) MatchSuffix(word []byte) bool {
    if len(word) == 0 { // Fix: empty slice check
        return false
    }
    // ...
}

Exploitation

Exploitation requires network access to route DNS queries through the Netfoil proxy. The attacker must possess prior knowledge of at least one domain explicitly configured on the target's allowlist to construct a valid payload.

The attack payload consists of a standard DNS query modified to prepend a single, arbitrary character to the known allowed domain. If the policy permits google.com, the attacker issues a DNS A or AAAA record query for xgoogle.com or 1google.com.

The Netfoil proxy receives the query and processes it through the vulnerable MatchExact function. The function truncates the leading x or 1, successfully matching the truncated string google.com against the similarly truncated entry in the trie. The proxy then resolves and forwards the traffic for the unapproved domain.

Impact Assessment

The vulnerability results in a total failure of the primary authorization control mechanism within the Netfoil proxy. The integrity of the DNS filtering policy is compromised, allowing arbitrary egress traffic that the administrator intended to block.

In environments where Netfoil serves as a critical defense-in-depth layer—such as preventing malware command-and-control (C2) communication or enforcing corporate acceptable use policies—this bypass neutralizes those protections. Attackers route malicious traffic disguised as legitimate, authorized flows.

The impact is limited to the proxy's routing decisions. The flaw does not grant memory corruption capabilities, nor does it allow for direct remote code execution on the Netfoil host itself. The system's confidentiality and availability remain intact, while the integrity of the filtering rules is completely broken.

Remediation

The primary remediation is to deploy Netfoil version v0.2.1. This release contains the corrected loop boundaries and the empty slice validation logic necessary to secure the domain matching processes.

System administrators must audit historical DNS logs to detect potential exploitation prior to patching. The detection signature involves identifying requests for domains that exactly match allowed domains but possess one additional prefix character. These requests frequently result in NXDOMAIN responses from upstream resolvers if the attacker-specified domain is not actually registered.

As a defense-in-depth measure, administrators must implement egress network filtering independently of DNS controls. A firewall rule restricting outbound traffic to approved IP ranges provides a secondary enforcement layer that mitigates the impact of DNS-level bypasses.

Official Patches

tinfoil-factoryNetfoil v0.2.1 Release
GitHub AdvisoryGHSA-84G5-X8J3-7235 Disclosure

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10

Affected Systems

Netfoil DNS Proxy (< v0.2.1)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Netfoil
tinfoil-factory
< 0.2.1v0.2.1
AttributeDetail
Vulnerability TypeIncorrect allowlist enforcement
CWE IDCWE-193, CWE-285
Attack VectorNetwork
ImpactSecurity feature bypass (DNS filtering)
Exploit StatusUnauthenticated Bypass
Patch StatusFixed in v0.2.1

MITRE ATT&CK Mapping

T1562.001Impair Defenses: Disable or Modify Tools
Defense Evasion
T1071.004Application Layer Protocol: DNS
Command and Control
CWE-193
Off-by-one Error

An off-by-one error occurs when a loop iterates one time too many or one time too few, leading to incorrect processing of boundaries.

Vulnerability Timeline

Fix commit pushed to repository
2026-04-21
Netfoil version v0.2.1 released
2026-04-21
Public disclosure via GitHub Advisory
2026-04-22

References & Sources

  • [1]Netfoil Repository
  • [2]CWE-193: Off-by-one Error
  • [3]CWE-285: Improper Authorization

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
21 views•6 min read
•about 18 hours ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read
•3 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
12 views•6 min read
•3 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read
•3 days ago•GHSA-X9F6-9RVM-MMRG
6.9

GHSA-X9F6-9RVM-MMRG: Improper Access Control and Volume Mount Isolation Bypass in vantage6 Node

An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.

Amit Schendel
Amit Schendel
4 views•4 min read