upatch.dev

CVE-2026-77348

Wallos incomplete fix for CVE-2026-33407: unauthenticated httpoxy SSRF still reachable via `endpoints/payments/search.php`

Refuses private and loopback outbound TCP connections from PHP processes to mitigate Wallos CVE-2026-77348.

High 8.2Vetted

EPSS 0.4%: the estimated chance this CVE is exploited in the next 30 days, as of 25 Nov 2026.

At a glance

CVE-2026-77348 is a high (CVSS 8.2) vulnerability in Wallos, published 31 August 2026. A vetted upatch, cve-2026-77348-ssrf-block, blocks it on running Linux machines with shirudo until Wallos is upgraded.

Severity
High 8.2 CVSS 3.1
Chance of exploitation
0.4% in the next 30 days (EPSS, 25 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-441, CWE-918, CWE-1188
Affected software
Wallos (ellite)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-77348 (GHSA-f8j2-qm83-r2w4), published on 31 August 2026, is an incomplete fix for CVE-2026-33407 (GHSA-hhjq-82f8-m6rc) in Wallos prior to version 5.0.0. While the earlier fix hardened endpoints/logos/search.php by disabling cURL proxying (CURLOPT_PROXY set to '' and CURLOPT_NOPROXY set to '*'), the unauthenticated endpoint endpoints/payments/search.php still reads HTTPS_PROXY and HTTP_PROXY in applyProxy() and passes the value directly to curl_setopt($ch, CURLOPT_PROXY, $proxy). Although curlGet() checks that the target URL host is duckduckgo.com or search.brave.com, resolves its IP with gethostbyname(), rejects private, reserved and CGNAT (100.64.0.0/10) addresses via FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE and is_cgnat_ip(), and pins the resolved IP with CURLOPT_RESOLVE, cURL connects to CURLOPT_PROXY instead of the pinned IP when a proxy is set. Under CGI or FastCGI setups where an inbound Proxy: HTTP header populates HTTP_PROXY (httpoxy), or whenever HTTP_PROXY/HTTPS_PROXY is attacker-influenced, an unauthenticated request to endpoints/payments/search.php?search=... redirects Wallos's outbound cURL request to an arbitrary internal or loopback address and port.

Official description

Wallos is an open-source, self-hostable personal subscription tracker. Prior to version 5.0.0, the fix for CVE-2026-33407 (GHSA-hhjq-82f8-m6rc, "SSRF via HTTP Proxy Environment Variable") hardened endpoints/logos/search.php by disabling cURL proxying (CURLOPT_PROXY = '' + CURLOPT_NOPROXY = '*'). However, Wallos ships a second, near-identical, unauthenticated logo-image search endpoint — endpoints/payments/search.php — that was not given the same hardening. It still passes the HTTP_PROXY/HTTPS_PROXY environment variable straight into CURLOPT_PROXY. This issue has been patched in version 5.0.0.

Affected versions

Wallos versions prior to 5.0.0 (such as 4.9.6 and 4.8.2) are affected; version 5.0.0 (commit 11eaf402e841a628c68a805694227ce66c45f6f3) fixes the vulnerability by ignoring uppercase HTTP_PROXY and HTTPS_PROXY variables and setting CURLOPT_PROXY = '' and CURLOPT_NOPROXY = '*' when no lowercase proxy variable is set.

The upatch uses the standard lsm/socket_connect hook (struct socket *, struct sockaddr *, int) and works on any Linux kernel supported by shirudo.

Sources

More references from NVD (4)

Mitigation

The BPF LSM program cve_2026_77348_connect attaches to lsm/socket_connect and returns -EPERM when all three conditions hold:

  1. The socket is a stream socket (SOCK_STREAM).
  2. The destination sockaddr is an IPv4 (AF_INET) or IPv6 (AF_INET6, including IPv4-mapped IPv6 ::ffff:0:0/96) address in the loopback (127.0.0.0/8, ::1), RFC 1918 private (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), RFC 6598 Carrier-Grade NAT (100.64.0.0/10), link-local and cloud metadata (169.254.0.0/16, fe80::/10), unique local (fc00::/7), unspecified (0.0.0.0/8, ::), or multicast/reserved (224.0.0.0/4, ff00::/8) ranges.
  3. The calling task's command name or executable name starts with php (matching php, php-fpm, php-fpm8.3, php-fpm8.4, php-cgi, php8.3, and php8.4).

This enforces in the kernel the private, reserved, loopback and CGNAT address filter that curlGet() in endpoints/payments/search.php applies only to the URL host and not to CURLOPT_PROXY. Each refused connection increments key 0 of the refused per-CPU array map. Any refusal from an earlier BPF LSM program on the same hook is preserved.

Side effects

  • Outbound TCP connections from php / php-fpm processes to loopback, RFC 1918 private, CGNAT (100.64.0.0/10), link-local (169.254.0.0/16) and reserved IP addresses fail with EPERM.
  • Outbound TCP connections from PHP to public IP addresses (such as duckduckgo.com and search.brave.com), Unix domain sockets (AF_UNIX, used by nginx to talk to PHP-FPM and for SQLite local database files), and UDP DNS lookups (SOCK_DGRAM) continue to work normally.
  • If a Wallos deployment uses an admin-allowlisted internal webhook, internal OIDC provider, or internal SMTP server over TCP, those connections from PHP are also refused while the upatch is loaded.
  • Non-PHP processes on the machine, including nginx, sshd and root's shell, are unaffected.

Preemption model and cost

The program keeps no shared state beyond the per-CPU refused counter, which is updated with __sync_fetch_and_add only when a connection is refused, so it is safe under every kernel preemption model, including preemptible RCU, PREEMPT_LAZY and PREEMPT_RT. On every socket_connect call, the program checks sock->type and the destination IP address first, returning immediately for non-stream sockets (such as UDP DNS queries and Unix datagrams), Unix domain stream sockets (AF_UNIX), and connections to public IP addresses without inspecting the calling task.

The policy

160 lines of BPF C, attached at lsm/socket_connect.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_endian.h>

#define EPERM 1
#define AF_INET 2
#define AF_INET6 10
#define SOCK_STREAM 1

char _license[] SEC("license") = "Dual BSD/GPL";

struct {
	__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
	__uint(max_entries, 1);
	__type(key, __u32);
	__type(value, __u64);
} refused SEC(".maps");

static __always_inline void count_refused(void)
{
	__u32 key = 0;
	__u64 *value = bpf_map_lookup_elem(&refused, &key);

	if (value)
		__sync_fetch_and_add(value, 1);
}

static __always_inline int earlier_verdict(int ret)
{
	return ret >= -4095 && ret < 0 ? ret : -EPERM;
}

static __always_inline bool is_internal_ipv4(__u32 ip)
{
	if ((ip & 0xff000000U) == 0x00000000U)
		return true;
	if ((ip & 0xff000000U) == 0x0a000000U)
		return true;
	if ((ip & 0xffc00000U) == 0x64400000U)
		return true;
	if ((ip & 0xff000000U) == 0x7f000000U)
		return true;
	if ((ip & 0xffff0000U) == 0xa9fe0000U)
		return true;
	if ((ip & 0xfff00000U) == 0xac100000U)
		return true;
	if ((ip & 0xffff0000U) == 0xc0a80000U)
		return true;
	if ((ip & 0xf0000000U) == 0xe0000000U)
		return true;
	return false;
}

static __always_inline bool is_internal_addr(const struct sockaddr *address, int addrlen)
{
	__u16 family = 0;

	if (!address || addrlen < (int)sizeof(struct sockaddr_in))
		return false;
	if (bpf_probe_read_kernel(&family, sizeof(family), &address->sa_family))
		return false;
	if (family == AF_INET) {
		__be32 raw = 0;

		if (bpf_probe_read_kernel(&raw, sizeof(raw),
					  &((const struct sockaddr_in *)address)->sin_addr.s_addr))
			return false;
		return is_internal_ipv4(bpf_ntohl(raw));
	}
	if (family == AF_INET6) {
		__be32 w[4] = {};
		__u32 w0;

		if (addrlen < (int)sizeof(struct sockaddr_in6))
			return false;
		if (bpf_probe_read_kernel(w, sizeof(w),
					  &((const struct sockaddr_in6 *)address)->sin6_addr))
			return false;
		if (w[0] == 0 && w[1] == 0 && w[2] == 0) {
			__u32 w3 = bpf_ntohl(w[3]);

			return w3 == 0 || w3 == 1;
		}
		if (w[0] == 0 && w[1] == 0 && bpf_ntohl(w[2]) == 0x0000ffffU)
			return is_internal_ipv4(bpf_ntohl(w[3]));
		w0 = bpf_ntohl(w[0]);
		if ((w0 & 0xfe000000U) == 0xfc000000U)
			return true;
		if ((w0 & 0xffc00000U) == 0xfe800000U)
			return true;
		if ((w0 & 0xff000000U) == 0xff000000U)
			return true;
	}
	return false;
}

static __always_inline bool is_php_name(const char *s, __u32 len)
{
	if (len < 3)
		return false;
	if (s[0] != 'p' || s[1] != 'h' || s[2] != 'p')
		return false;
	if (len == 3)
		return true;
	return (s[3] >= '0' && s[3] <= '9') || s[3] == '-' || s[3] == '.';
}

static __always_inline bool current_is_php(void)
{
	char comm[16] = {};
	struct task_struct *task;
	const struct dentry *exe;
	const unsigned char *name;
	__u32 len;
	char buf[16] = {};

	if (bpf_get_current_comm(comm, sizeof(comm)) == 0) {
		__u32 clen = 0;

		for (__u32 i = 0; i < sizeof(comm); i++) {
			if (comm[i] == 0)
				break;
			clen++;
		}
		if (is_php_name(comm, clen))
			return true;
	}
	task = bpf_get_current_task_btf();
	exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	if (!exe)
		return false;
	len = BPF_CORE_READ(exe, d_name.len);
	name = BPF_CORE_READ(exe, d_name.name);
	if (!name || len < 3)
		return false;
	if (bpf_probe_read_kernel_str(buf, sizeof(buf), name) < 0)
		return false;
	return is_php_name(buf, len < 15 ? len : 15);
}

SEC("lsm/socket_connect")
int BPF_PROG(cve_2026_77348_connect, struct socket *sock,
	     struct sockaddr *address, int addrlen, int ret)
{
	if (ret)
		return earlier_verdict(ret);
	if (!sock || sock->type != SOCK_STREAM)
		return 0;
	if (!is_internal_addr(address, addrlen))
		return 0;
	if (!current_is_php())
		return 0;
	count_refused();
	return -EPERM;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 31 Aug 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #105 openedAdd CVE-2026-77348: Refuses private and loopback outbound TCP connections from PHP processes toromanlab
  3. 25 Nov 2026CICheck entriespassed
  4. 25 Nov 2026CICompile with clang 23passed
  5. 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
  6. 25 Nov 2026MergeMerged #105romanlab

No human review is recorded on GitHub for this upatch yet.

Evidence

On Wallos 4.9.6 with HTTP_PROXY pointing to a loopback listener, endpoints/payments/search.php connected to the loopback proxy before loading and after unloading the upatch, and was refused while the upatch was loaded while still answering HTTP 200.

Tested
25 Nov 2026
Target
Wallos 4.9.6 on nginx and PHP-FPM with HTTP_PROXY=http://127.0.0.1:18081, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Machine
shirudo test VM
Distribution
Ubuntu 26.04
Results
StateLoopback proxy connection from endpoints/payments/search.phpEndpoint HTTP response
Before loadingreached (CONNECT duckduckgo.com:443)HTTP 200
Upatch loadedblocked (EPERM)HTTP 200
After unloadingreached (CONNECT duckduckgo.com:443)HTTP 200
tools-test.log Output of tools/test --setup showing the probe reached before, blocked while loaded, and reached after.
tools/test --setup, 2026-11-25T16:26:09Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-77348
  setup   done         WALLOS_URL=http://127.0.0.1:18080 WALLOS_PROXY_PORT=18081
  before  reached      Wallos connected to loopback proxy 127.0.0.1:18081 (CONNECT duckduckgo.com:443 HTTP/1.1)
  loaded  blocked      Wallos did not connect to loopback proxy 127.0.0.1:18081 (HTTP 200)
  after   reached      Wallos connected to loopback proxy 127.0.0.1:18081 (CONNECT duckduckgo.com:443 HTTP/1.1)
  PASS: reached before, blocked while loaded, reached again after

Use it

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-77348
Publish and roll out
shirudo bpm push build/packages/cve-2026-77348-1.0.0.bee oci://<registry>/<namespace>/cve-2026-77348 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-77348-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>