Versions
AEM 6.2 to 6.5, on premises or on Adobe Managed Services, and AEM as a Cloud Service
Platforms / AEM
An AEM security scan is the CMS Security Audit of the custom Java bundles, HTL scripts, configuration and Dispatcher rules of an Adobe Experience Manager project.
The CMS Security Scanner reads the custom code of an AEM project on AEM 6.2 to 6.5, on premises or on Adobe Managed Services, or on AEM as a Cloud Service. A CMS Security Consultant checks each finding in your bundles and Dispatcher rules before it goes into the report.
Versions
AEM 6.2 to 6.5, on premises or on Adobe Managed Services, and AEM as a Cloud Service
Code read
Java bundles, HTL and JSP scripts, clientlibs, OSGi configurations, content packages, ACLs and repoinit, Dispatcher and CDN configuration
What we need
A source archive or a Git repository, the AEM version, and the Dispatcher and CDN configuration
Report
Findings with severity, the entry point, the code path to the sink and a fix, reviewed by CMS Security Consultants
The scan lists every construct that lets a request, an event or a job reach custom code, and records the access control in front of it.
| Category | Construct in your code | Risk |
|---|---|---|
| Path-bound servlets | sling.servlet.paths, @SlingServletPaths and the older @SlingServlet annotation | Repository ACLs cannot protect a path-bound servlet, so the code and the Dispatcher filter are its only gates. |
| Resource-type servlets | sling.servlet.resourceTypes with selectors, extensions and methods | Any resource that carries the resource type reaches the servlet, so a broad binding widens the reachable surface. |
| Filters, whiteboard servlets and authentication handlers | Sling filters, OSGi HTTP Whiteboard servlets, AuthenticationHandler implementations for SAML, OAuth and custom tokens | A filter sees every request in its scope, and an authentication handler decides what proof of identity the platform accepts. |
| Sling Models and JSON exporters | @Model classes, Java Use objects, @Exporter with the Jackson exporter | Each exported model becomes a JSON endpoint on every resource that it adapts, without a servlet declaration. |
| HTL and JSP components | Component scripts under /apps and overlays of product scripts under /libs | Each script is an implicit entry point that Sling selects by resource type, and an overlay inherits the product traffic. |
| Sling POST servlet and custom POST operations | :operation requests, PostOperation and SlingPostProcessor services | The POST servlet is a write API on every resource, and the repository ACLs are its only gate. |
| Resource providers, adapters and rewriters | ResourceProvider, AdapterFactory, rewriter TransformerFactory and SitemapGenerator services | These components create synthetic resources or process every served page, often for anonymous visitors. |
| Headless and query APIs | AEM GraphQL endpoints, persisted queries, Content Fragment models and Query Builder predicates | A GraphQL endpoint exposes the content models of its configuration, and request data in a predicate changes the repository query. |
| Workflows, events, jobs and schedulers | WorkflowProcess steps, workflow launchers, EventHandler, JobConsumer, ResourceChangeListener and Sling Scheduler jobs | A content change can start background code that runs as a service user with more rights than the author. |
| Replication and distribution | Replication agents, Sling Content Distribution and Replicator calls | These paths move content from the author tier to the publish tier, where visitors see it. |
| OSGi configuration, ACLs and service users | Run-mode OSGi configurations, _rep_policy.xml files, repoinit scripts, service user mappings and closed user groups | These files decide who may read or write each path and what each service identity may do. |
| Resource mapping and content packages | /etc/map, vanity paths, aliases, redirect properties, the Externalizer, filter.xml and install hooks | Mapping rules decide which hosts and links the site trusts, and install hooks run code at deployment time. |
| Dispatcher and CDN rules | Dispatcher farms, filters, cache rules, virtual hosts, rewrite rules and cdn.yaml traffic filters | These rules decide which paths, selectors and methods reach publish, and which responses other visitors receive from cache. |
| Client libraries and authored markup | Clientlib JavaScript, inline scripts and data attributes in HTL, DAM SVG and HTML assets, Experience Fragments and i18n dictionaries | Data that the server escapes for one context can reach a DOM sink in the browser of every visitor. |
The scan traces user data from each entry point to the operations below, in the source code and in the compiled bundles.
| Operation | What the scanner looks for |
|---|---|
| Repository query injection | QueryBuilder predicates, JCR-SQL2 and XPath strings built from request data instead of fixed or bound values. |
| Privileged sessions | Service resource resolvers and the deprecated administrative resolver, and the request data that reaches code after the elevation. |
| Repository writes and permission changes | Node, property and DAM asset writes, ACL changes and replication calls that a lower-privileged caller can steer. |
| Cross-site scripting | HTL expressions with context='unsafe' or a weak explicit context, raw response writers in Java, and DOM sinks in clientlibs. |
| Server-side request forgery | Outbound HTTP clients and URL connections whose target host or path comes from request data or authored content. |
| Deserialization | Jackson polymorphic typing, Java object streams, XMLDecoder, YAML and XStream binding of untrusted data. |
| XML external entities | XML parsers and transformers that resolve external entities or schemas from request data. |
| Path traversal and file access | File system reads and repository path lookups whose path comes from a suffix, a selector or a request parameter. |
| Command and code execution | Process execution, script engines, Groovy evaluation and reflection that request data can reach. |
| Open redirect and injection in mail or logs | Redirect targets, mapped links, mail headers and log lines built from request data without validation. |
Adobe security bulletins for AEM show the vulnerability classes that the scan looks for in custom code.
The scanner reviews the custom code and configuration that a customer deploys on AEM, not the Adobe product. This includes Java bundles, HTL and JSP scripts, clientlibs, OSGi configurations, ACLs, Dispatcher rules and the CDN configuration. CMS Security Consultants review each finding before the report.
The scan covers AEM 6.2 to 6.5, on premises or on Adobe Managed Services, and AEM as a Cloud Service. The version decides who owns the product updates, so the report separates custom code issues from product patch levels.
A path-bound servlet is not a defect by itself. Repository ACLs cannot protect a path-bound servlet, so the code and the Dispatcher filter must enforce access. The Apache Sling documentation recommends resource-type binding for this reason.
The Dispatcher and the CDN decide which requests reach the publish tier and which responses they cache. A permissive filter or cache rule can expose a servlet or serve one visitor's response to other visitors.
Cloud Manager runs SonarQube and OakPAL rules on every build, and those rules check code patterns file by file. The scan follows data from each entry point to each sink, and it also reads ACLs, Dispatcher rules and the built bundles.
No. The scan reads source code, configuration and built artifacts. It needs no credentials for an author or publish environment.
The same method, report and consultants apply to each platform.
Tell us how to reach you. A CMS Security Consultant will contact you to plan your AEM scan.