upatch.dev

CVE-2026-85380

light0011 cms UEditor controller.php catchimage server-side request forgery

Refuses outbound connections from PHP web processes to loopback, private and link-local addresses to mitigate CVE-2026-85380.

Medium 5.5Vetted

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

At a glance

CVE-2026-85380 is a medium (CVSS 5.5) vulnerability in light0011 CMS, published 4 September 2026. A vetted upatch, cve-2026-85380-ssrf-block, blocks it on running Linux machines with shirudo until light0011 CMS is upgraded.

Severity
Medium 5.5 CVSS 4.0
Chance of exploitation
0.5% in the next 30 days (EPSS, 25 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-918
Affected software
light0011 CMS
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-85380, published on 4 September 2026, is an unauthenticated server-side request forgery (CWE-918) in the UEditor component bundled with light0011/cms at commits c774dce31c6df0055568a8d5c53d964d99be199d and f72cf46f601efb2a0618c3814cc2f61380b38930. Public/ueditor/php/controller.php dispatches the catchimage action without authentication to Public/ueditor/php/action_crawler.php, which passes each URL in the source[] request parameter to Uploader in Public/ueditor/php/Uploader.class.php with type "remote". Uploader::saveRemote() checks only that the URL starts with http before calling get_headers() and readfile() on it and writing the response under the public upload path /ueditor/upload/image/.... Adding a fragment with an allowed extension such as #allowed.png satisfies the strrchr($imgUrl, '.') suffix check while fetching arbitrary internal HTTP endpoints.

Official description

A weakness has been identified in light0011 cms c774dce31c6df0055568a8d5c53d964d99be199d/f72cf46f601efb2a0618c3814cc2f61380b38930. This vulnerability affects the function catchimage of the file Public/ueditor/php/controller.php of the component UEditor. This manipulation of the argument source[] causes server-side request forgery. The attack may be initiated remotely. The exploit has been made available to the public and could be used for attacks. This product uses a rolling release model to deliver continuous updates. As a result, specific version information for affected or updated releases is not available. The project was informed of the problem early through an issue report but has not responded yet.

Affected versions

light0011/cms uses a rolling repository without tagged releases:

Product Affected commits Fixed in
light0011/cms c774dce31c6df0055568a8d5c53d964d99be199d, f72cf46f601efb2a0618c3814cc2f61380b38930 none (unfixed upstream)

Sources

More references from NVD (6)

Mitigation

The BPF LSM program cve_2026_85380_ssrf_block attaches to lsm/socket_connect and returns -EPERM when a PHP web process (php, php*, php-fpm*, apache2 or httpd, matched by executable name or task comm) attempts to connect an AF_INET or AF_INET6 socket to an internal address:

  • IPv4 loopback (127.0.0.0/8) and 0.0.0.0/8
  • IPv4 RFC 1918 private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
  • IPv4 link-local and cloud metadata addresses (169.254.0.0/16)
  • IPv4 carrier-grade NAT (100.64.0.0/10)
  • IPv6 loopback (::1), unspecified (::), unique local (fc00::/7), link-local (fe80::/10), and IPv4-mapped (::ffff:0:0/96) addresses in the IPv4 ranges above

The program checks the socket address family and destination IP range first, and inspects the current task's executable and command name only when the destination is an internal IPv4 or IPv6 address. A refusal from an earlier BPF LSM program on the same hook is passed on unchanged.

Side effects

  • Outbound TCP or UDP connections from PHP web processes to loopback, private, link-local or carrier-grade NAT IPv4 and IPv6 addresses fail with EPERM, so catchimage returns ERROR_DEAD_LINK (链接不可用) for internal targets.
  • If the PHP application connects to a database or cache (such as MySQL or Redis) over a TCP socket on 127.0.0.1 or a private IP rather than a Unix domain socket (AF_UNIX), those TCP connections are also refused while the upatch is loaded. Unix domain socket connections are unaffected.
  • Outbound connections from PHP to public IP addresses and all connections from non-PHP processes work as before.

Preemption model and cost

The program keeps no maps or shared state, so it is safe under every preemption model, including preemptible RCU (PREEMPT_LAZY, PREEMPT_DYNAMIC) and PREEMPT_RT. On every socket_connect call to a public IP address or a non-IP socket (such as AF_UNIX), the program reads the address family and destination IP and returns immediately without inspecting the task struct.

The policy

135 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

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

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

static __always_inline bool is_internal_v6(const struct sockaddr_in6 *sin6)
{
	__u32 w0 = bpf_ntohl(BPF_CORE_READ(sin6, sin6_addr.in6_u.u6_addr32[0]));
	__u32 w1 = bpf_ntohl(BPF_CORE_READ(sin6, sin6_addr.in6_u.u6_addr32[1]));
	__u32 w2 = bpf_ntohl(BPF_CORE_READ(sin6, sin6_addr.in6_u.u6_addr32[2]));
	__u32 w3 = bpf_ntohl(BPF_CORE_READ(sin6, sin6_addr.in6_u.u6_addr32[3]));

	if (w0 == 0 && w1 == 0 && w2 == 0 && (w3 == 0 || w3 == 1))
		return true;
	if (w0 == 0 && w1 == 0 && w2 == 0x0000ffffU)
		return is_internal_v4(w3);
	if ((w0 & 0xfe000000U) == 0xfc000000U)
		return true;
	if ((w0 & 0xffc00000U) == 0xfe800000U)
		return true;
	return false;
}

static __always_inline bool is_php_name(const char *buf, __u32 len)
{
	if (len >= 3 && buf[0] == 'p' && buf[1] == 'h' && buf[2] == 'p') {
		char c = len > 3 ? buf[3] : 0;

		if (c == 0 || c == '-' || (c >= '0' && c <= '9'))
			return true;
	}
	if (len == 7 && buf[0] == 'a' && buf[1] == 'p' && buf[2] == 'a' &&
	    buf[3] == 'c' && buf[4] == 'h' && buf[5] == 'e' && buf[6] == '2')
		return true;
	if (len == 5 && buf[0] == 'h' && buf[1] == 't' && buf[2] == 't' &&
	    buf[3] == 'p' && buf[4] == 'd')
		return true;
	return false;
}

static __always_inline bool current_is_php(void)
{
	struct task_struct *task = bpf_get_current_task_btf();
	const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	char comm[16] = {};

	if (exe) {
		const unsigned char *name = BPF_CORE_READ(exe, d_name.name);
		__u32 len = BPF_CORE_READ(exe, d_name.len);
		char buf[16] = {};

		if (name && bpf_probe_read_kernel_str(buf, sizeof(buf), name) > 0 &&
		    is_php_name(buf, len))
			return true;
	}
	if (bpf_get_current_comm(&comm, sizeof(comm)) == 0) {
		__u32 len = 0;

		for (__u32 i = 0; i < sizeof(comm); i++) {
			if (!comm[i])
				break;
			len++;
		}
		if (is_php_name(comm, len))
			return true;
	}
	return false;
}

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

SEC("lsm/socket_connect")
int BPF_PROG(cve_2026_85380_ssrf_block, struct socket *sock,
	     struct sockaddr *address, int addrlen, int ret)
{
	__u16 family;
	bool internal = false;

	if (ret)
		return earlier_verdict(ret);
	if (!address || addrlen < (int)sizeof(struct sockaddr))
		return 0;

	family = BPF_CORE_READ(address, sa_family);
	if (family == AF_INET) {
		const struct sockaddr_in *sin;
		__u32 ip;

		if (addrlen < (int)sizeof(struct sockaddr_in))
			return 0;
		sin = (const struct sockaddr_in *)address;
		ip = bpf_ntohl(BPF_CORE_READ(sin, sin_addr.s_addr));
		internal = is_internal_v4(ip);
	} else if (family == AF_INET6) {
		if (addrlen < (int)sizeof(struct sockaddr_in6))
			return 0;
		internal = is_internal_v6((const struct sockaddr_in6 *)address);
	}

	if (!internal || !current_is_php())
		return 0;
	return -EPERM;
}

Process

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

  1. 4 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #87 openedAdd CVE-2026-85380: Refuses outbound connections from PHP web processes to loopback, private andromanlab
  3. 25 Nov 2026CIUpdate upatch.devpassed
  4. 25 Nov 2026CICIpassed
  5. 25 Nov 2026MergeMerged #87romanlab

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

Evidence

On light0011/cms commit f72cf46f601efb2a0618c3814cc2f61380b38930 served by PHP on loopback, the loaded upatch blocked the UEditor catchimage SSRF connection to a loopback HTTP listener while normal config requests kept working.

Tested
25 Nov 2026
Target
light0011/cms commit f72cf46f601efb2a0618c3814cc2f61380b38930 on PHP CLI built-in web server, loopback only
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Machine
shirudo test VM
Distribution
Ubuntu 26.04
Results
StateUEditor catchimage SSRF reaches 127.0.0.1 listenerUEditor controller.php?action=config
Before loadingyes (reached)200
Upatch loadedno (blocked)200
After unloadingyes (reached)200
tools-test.log Output of tools/test --setup showing the probe reached before and after the upatch was loaded and was blocked while loaded.
tools/test --setup, 2026-11-25T15:24:31Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-85380
  setup   done         CMS_URL=http://127.0.0.1:18080 CMS_ROOT=/opt/upatch-payload/cve-2026-85380/cms-f72cf46f601efb2a0618c3814cc2f61380b38930
  before  reached      UEditor catchimage connected to internal listener 127.0.0.1:46673 (HTTP 200)
  loaded  blocked      UEditor catchimage connection to 127.0.0.1:41329 was refused (HTTP 200)
  after   reached      UEditor catchimage connected to internal listener 127.0.0.1:40483 (HTTP 200)
  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-85380
Publish and roll out
shirudo bpm push build/packages/cve-2026-85380-1.0.0.bee oci://<registry>/<namespace>/cve-2026-85380 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-85380-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>