Habr•October 1, 2026•🇷🇺Translated from Russian

Part 2: How Third-Party Developers Closed the tun0 Leak in AmneziaVPN on Android

Third-party developers have published a detailed technical breakdown of how they closed a long-standing VPN tunnel leak affecting AmneziaVPN on Android. The issue, first reported in issue #2457, allows applications excluded from the VPN tunnel to bind sockets directly to the tun0 interface and thereby learn the address of the VPN server.

The root cause lies in Linux kernel behavior on versions 5.7 and newer. When an excluded application calls setsockopt(SO_BINDTODEVICE, "tun0"), the kernel falls back to treating the destination as an on-link neighbor if no matching routing rule exists for the UID. This bypasses the UID-based split-tunneling rules installed by VpnService and addDisallowedApplication.

The fix introduces a packet filter that inspects every outbound packet read from the tunnel descriptor. For each new flow the filter calls ConnectivityManager.getConnectionOwnerUid through a JNI bridge to obtain the UID. If the returned UID is INVALID_UID or belongs to the VPN client itself, the packet is dropped. In exclude mode this single rule effectively blocks all bypass attempts because excluded applications are never reported as owners.

The implementation was added to both traffic paths inside AmneziaVPN. On the Xray path the check sits inside the gVisor stack before SOCKS connections are created. On the AmneziaWG path a lightweight hook was placed inside amneziawg-go immediately after packet padding, maintaining a small cache of UID decisions to avoid repeated JNI calls.

Performance measurements on Android 16 showed no measurable increase in connection latency at 5000 new flows per second. When disabled, the filter adds only a single atomic read per packet and contributes no code to non-Android builds.

The authors stress that they are not official maintainers and that the three submitted pull requests remain unmerged. A side-loaded test build is available for verification. The article concludes with an extensive list of remaining edge cases, including raw sockets, IPv6, tethering, and certain UDP behaviors, together with a checklist for other VPN clients wishing to implement similar protections.

Related articles

Security NEXT•Vulnerabilities & Exploits

GitLab Issues Critical Patches for CVE-2026-110264 Affecting Wide Range of Versions

GitLab has released emergency security updates to address multiple vulnerabilities, including one rated critical that allows unauthenticated remote code execution. The flaw, tracked as CVE-2026-110264, stems from an integer overflow in the regular expression compiler and carries a maximum CVSSv3.1 base score of 10.0. It impacts GitLab Community Edition and Enterprise Edition starting from version 7.0, with patches now available for both current and older branches. The company strongly urges immediate updates due to the severity and potential for arbitrary code execution on affected servers. Additional lower-severity issues were also resolved in the same release cycle.

Hispasec•Vulnerabilities & Exploits

PHP Issues Emergency Patches for Critical PHP2Shell RCE Flaws as Exploit Attempts Emerge

PHP has released urgent patches for two critical vulnerabilities collectively known as PHP2Shell that enable unauthenticated remote code execution on affected servers. The flaws, tracked as CVE-2026-109618 and CVE-2026-109619, score 9.2 on CVSS v4.0 and have already seen active exploitation attempts with malicious payloads adjusted to bypass WAF rules. The issues affect multiple PHP deployment methods including Apache with mod_php, PHP-FPM, php-cgi, FrankenPHP, and LiteSpeed, and do not require complex application code to be exploitable. CVE-2026-109618 involves a memory corruption chain leading to code execution under the web process privileges, while CVE-2026-109619 stems from an obsolete global state issue causing use-after-free conditions that can result in memory disclosure and code execution. Patched versions include PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, with administrators advised to restart all persistent workers after updating. Temporary mitigations such as setting memory_limit to -1 and disabling session.upload_progress.enabled are available for environments that cannot patch immediately.

Security NEXT•Vulnerabilities & Exploits

Two Critical RCE Vulnerabilities Patched in PHP with CVSS 9.2 Scores

The PHP development team has disclosed two severe remote code execution vulnerabilities affecting the widely used scripting language. Both issues, tracked as CVE-2026-109618 and CVE-2026-109619, received a CVSSv4.0 base score of 9.2 and were rated Critical. The flaws stem from improper memory handling during request processing and cleanup phases. Exploitation could allow attackers to execute arbitrary code by manipulating uninitialized or residual data in worker processes. Security updates addressing both vulnerabilities were released on October 21, 2026, and users are strongly urged to apply the patches immediately. The advisories were previewed the previous day, highlighting the urgency of the fixes.

BoletimSec•Vulnerabilities & Exploits

Critical PHP Core Flaws Enable Unauthenticated Remote Code Execution

The PHP project released emergency patches on October 21 for two critical vulnerabilities in the language core, tracked as CVE-2026-109618 and CVE-2026-109619 and collectively referred to as PHP2Shell. Both issues received a CVSS 4.0 score of 9.2 and allow remote code execution without authentication. CVE-2026-109618 resides in memory-handling routines where longjmp can leave request data partially initialized, and subsequent shutdown operates on invalid data; multipart requests with many headers or empty file fields can trigger the condition. CVE-2026-109619 affects an obsolete global state in long-lived workers that retain references to freed memory, with confirmed paths involving fatal errors, error reporting data, and session upload progress. Researchers demonstrated unauthenticated code execution over HTTP against the first flaw on Apache with mod_php using default limits, while PHP-FPM exposure was identified through code analysis. The FBI Cyber Division issued an alert urging immediate updates, and Cloudflare deployed WAF rules while confirming early attacks in the wild.