Preventing AEM as a Cloud Service outages from malicious scanning and custom 404 logic

This article explains how malicious scanning traffic combined with inefficient custom 404 page logic causes outages in Adobe Experience Manager as a Cloud Service. It provides steps to optimize the custom 404 implementation and strengthen CDN protections.

Description description

Environment

Adobe Experience Manager as a Cloud Service (all versions)

Issue/Symptoms

  • The publish tier experiences a full site outage.
  • CPU usage becomes high, and threads become exhausted.
  • Unexpected service restarts occur.

Cause

A burst of malicious vulnerability-scanning traffic targeting common file paths, such as .git and .env, reaches the publish tier. The custom 404 page logic renders a full page for each 404 response and includes a component that performs an unindexed database search. This makes each 404 response resource-intensive, exhausts available threads and CPU, and results in a temporary outage.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review your custom 404page implementation:

    • Ensure that the logic for handling 404 (not found) responses is lightweight and does not perform expensive operations, such as unindexed database searches.
    • Remove or refactor any components that trigger resource-intensive lookups on 404 pages.
    • If a database search is required, ensure that a proper index exists to avoid full repository scans.
  2. Strengthen your CDN or Dispatcher protections:

    • Block known scanning paths, such as .git, .env, .aws, etc., at the CDN or Dispatcher layer to prevent these requests from reaching the AEM origin.
    • Implement rate limiting based on real IP addresses and/or user agent to throttle or block bursts of malicious or abnormal traffic before they reach AEM.
    • Consider using a web application firewall (WAF) or similar advanced protection on your CDN to block vulnerability scans and other malicious behaviors.
  3. After making these changes, monitor your environment for reduced resource usage and confirm that 404 responses are served efficiently without causing high CPU or thread exhaustion.

recommendation-more-help
experience-cloud-kcs-help-kbarticles