A sandbox escape vulnerability exists in dotCMS’s Velocity scripting engine (VTools) that allows authenticated users with scripting privileges to bypass class and package restrictions enforced by SecureUberspectorImpl.
By dynamically modifying the Velocity engine’s runtime configuration and reinitializing its Uberspect, a malicious actor can remove the introspector.restrict.classes and introspector.restrict.packages protections.
Once these restrictions are cleared, the attacker can access arbitrary Java classes, including java.lang.Runtime, and execute arbitrary system commands under the privileges of the application process (e.g. dotCMS or Tomcat user).
An issue was discovered in the ContentResource API in dotCMS 3.0 through 22.02. Attackers can craft a multipart form request to post a file whose filename is not initially sanitized. This allows directory traversal, in which the file is saved outside of the intended storage location. If anonymous content creation is enabled, this allows an unauthenticated attacker to upload an executable file, such as a .jsp file, that can lead to remote code execution.
An issue was discovered in dotCMS through 3.6.1. The findChildrenByFilter() function which is called by the web accessible path /categoriesServlet performs string interpolation and direct SQL query execution. SQL quote escaping and a keyword blacklist were implemented in a new class, SQLUtil (main/java/com/dotmarketing/common/util/SQLUtil.java), as part of the remediation of CVE-2016-8902; however, these can be overcome in the case of the q and inode parameters to the /categoriesServlet path. Overcoming these controls permits a number of blind boolean SQL injection vectors in either parameter. The /categoriesServlet web path can be accessed remotely and without authentication in a default dotCMS deployment.
dotCMS before 5.2.4 is vulnerable to directory traversal, leading to incorrect access control. It allows an attacker to read or execute files under $TOMCATHOME/webapps/ROOT/assets (which should be a protected directory). Additionally, attackers can upload temporary files (e.g., .jsp files) into /webapps/ROOT/assets/tmpupload, which can lead to remote command execution (with the permissions of the user running the dotCMS application).
Improper authorization in the ToolGroupResource and RoleAjax REST/DWR endpoints in dotCMS dotCMS 21.02 through 26.06.22-03 on all platforms allows a low-privileged authenticated backend user to self-assign the administrative layout and self-grant the CMS Administrator role, then achieve remote code execution via a crafted OSGi bundle upload whose BundleActivator executes arbitrary shell commands.
An incomplete restricted-class check in the Velocity template sandbox (SecureIntrospectorImpl) in dotCMS versions before 26.09.23-01 (25.07.10 LTS before v21) allows an authenticated back-end user who can run Velocity scripts, without administrator rights, to call methods on file-system, I/O stream and network-resource objects. The user can read and write any file the dotCMS service account can access, including signing keys and stored secrets, and execute operating-system commands on the server. This issue is distinct from SI-74. Fixed in 26.09.23-01 and later, and in 25.07.10 LTS v21. The sandbox now denies method calls on the file, path, stream, channel, file-system, URL and URI type families, including their subclasses and platform implementations.
Path traversal in the WebDAV interface (DotWebdavHelper and the WebDAV temporary-file COPY and MOVE handling) in dotCMS versions before 26.10.19-01 (25.07.10 LTS before v21) allows any authenticated user, including a front-end-only account, to read and write files outside the WebDAV temporary directory with the privileges of the dotCMS service account. This exposes sensitive files such as signing keys and allows remote code execution, because plugins written to the OSGi upload folder are installed automatically. Fixed in 26.10.19-01 and later, and in 25.07.10 LTS v21. WebDAV temporary storage now uses its own directory, every temporary path is confined to it, and names used to create, copy or move temporary files must be a single path segment.
Improper authorization in the legacy push-publishing endpoint and environment management actions, combined with missing file name validation in the push-publish bundle receiver, in dotCMS versions from at least 4.1.0 up to 26.10.13-01 (25.07.10 LTS before v22) allows an authenticated back-end user with only publishing-queue or maintenance tool access, without administrator rights, to register a push-publishing endpoint with an authentication key of their choosing and use it to write files outside the bundle directory on the receiving server. This leads to remote code execution as the dotCMS service account. Fixed in 26.10.19-01 and later, and in 25.07.10 LTS v22. Creating or changing push-publishing endpoints and environments now requires an administrator or access to the Configuration tool, and the bundle receiver accepts only a plain bundle file name inside the bundles directory.
Improper verification of SAML responses in the bundled dotSAML plugin in dotCMS versions prior to 26.10.22-01, and 25.07.10 LTS prior to v24, allows an unauthenticated remote attacker to sign in as any user, including an administrator, on sites where SAML authentication is configured. The SAML app's default Validation Type was "None", which skipped signature verification of the SAML response and assertion, and the service provider did not enforce the audience, validity window, destination, subject confirmation (recipient and InResponseTo) and one-time-use checks required by the SAML 2.0 Web Browser SSO profile. SAML is not enabled by default. Fixed in 26.10.22-01 and later, and in 25.07.10 LTS v24. Signed responses are now required by default (a stored "None" is treated as Response and Assertion and the option is removed), and every response is checked for issuer, audience, destination, recipient, InResponseTo, validity window and replay, with an allow-list of signature algorithms.
Exposure of sensitive information in the content lock-check endpoints (PUT /api/content/canLock and GET /api/v1/content/canlock) in dotCMS versions before 26.10.23-02, and 25.07.10 LTS before v23, allows anyone who can read a piece of content, including anonymous visitors under the default configuration, to obtain the full account record of the user who holds the lock on that content, including the email address, password hash and pending password reset data. When a privileged user such as an administrator has publicly readable content locked, an unauthenticated attacker can take over that account. A related flaw in the forgot-password endpoint (POST /api/v1/forgotpassword) disclosed user email addresses and confirmed which user IDs exist when login by user ID is enabled. Fixed in 26.10.23-02 and later: the lock-check endpoints return only the lock owner's display name, and only to back-end users, and the forgot-password endpoint gives the same response to every valid request.
An issue was discovered in dotCMS core 5.3.8.5 through 5.3.8.15 and 21.03 through 22.10.1. A cryptographically insecure random generation algorithm for password-reset token generation leads to account takeover.
Improper authorization in the push-publishing bundle upload endpoints (POST /api/bundle, POST /api/bundle/sync and the legacy Publishing Queue upload) and in the receiver's plugin deployment handler in dotCMS before 26.10.23-01 (25.07.10 LTS before v23) allows any authenticated backend user, including one with no portlets and no content permissions, to upload a bundle that installs and starts an OSGi plugin on the server. This results in remote code execution as the dotCMS service user and lets the attacker grant themselves the CMS Administrator role; a plugin deployed this way persists across restarts in the shared plugin folder.
Fixed in 26.10.23-01 and later, and in LTS 25.07.10 v23 and later. Bundle uploads now require the Publishing Queue portlet, a bundle that carries plugins is accepted from an uploading user only if they also have the Plugins portlet, bundles received from registered push-publishing senders keep working as before, and a bundle whose metadata cannot be read is rejected before it is processed.
Improper authorization in the Rules engine in dotCMS versions before 26.10.29-01 allows an authenticated backend user who can author rules on a site or page to add rule actions that set the session or request attributes dotCMS uses to identify the signed-in user, so that requests to the site, including unauthenticated requests without cookies, are served as any user the attacker chooses, including an administrator. In some cases the Rules permission check was skipped entirely, so backend users without Rules permission could also create and change such rules. Fixed in 26.10.29-01 and later. Every rule operation now checks the permission on the rule's parent, the rule REST endpoints require a backend user, and the Set Session Attribute, Set Request Attribute and Set Response Header actions refuse the names dotCMS uses for authentication and login, and the Set-Cookie header.
Improper authorization in user role management (the UserAjax.updateUserRoles DWR method used by the Users tool, and the POST and PUT /api/v1/users REST endpoints) in dotCMS versions before 26.10.23-02, and 25.07.10 LTS before v23, allows a non-administrator back-end user who has been given the Users tool to grant roles, including CMS Administrator, to their own account, resulting in full administrative access. Through the REST endpoints, a user who also holds the Roles tool could create new administrator accounts. Fixed in 26.10.23-02 and later: adding or removing a user's roles, and creating users, now require the CMS Administrator role.
Improper neutralization of special characters in the content search query builder (ESContentletAPIImpl permission filtering) in dotCMS through 26.10.29-01 allows a caller to craft a Lucene query that turns the permission clause dotCMS appends to every non-administrator search into an optional clause. Search paths that rely on that clause can then return live content the caller has no READ permission on, including content restricted to specific roles. The content search APIs accept anonymous callers under the default CONTENTAPISALLOWANONYMOUS=READ setting, and non-administrator back-end users are affected the same way. Fixed in 26.11.02-01 and later: the caller's query is now normalized before any permission clause is appended.
Improper authorization in the Logout As REST endpoint (/api/v1/users/logoutas), combined with insufficient restrictions on the session attributes that Velocity code can write, in dotCMS versions before 26.10.28-02 allows an authenticated backend user who can author Velocity that renders in their own session (for example widget code, containers, templates or VTL files) to switch their session to any user, including a CMS Administrator, without holding the Login As role or knowing that user's password. Fixed in 26.10.28-02 and later. Logout As now restores a user only from an active Login As session record that Velocity code cannot create or change.
Improper authorization in the deprecated content relationships REST endpoint (/api/v1/contentrelationships) in dotCMS through 26.10.28-02 allows any caller who can read a contentlet to retrieve the full field values of every contentlet related to it, including related content the caller has no READ permission on and draft or never-published versions. The related records were loaded without applying the caller's permissions. Under the default anonymous content API setting (CONTENTAPISALLOWANONYMOUS=READ) no authentication is required; otherwise any authenticated user can exploit it. Fixed in 26.10.28-03 and later: the endpoint now returns only the related content the requesting user may read, and anonymous and front-end callers receive only published versions.
Path traversal in the push-publish bundle receiver (BundlePublisherResource, /api/bundlePublisher/publish) in dotCMS versions from at least 4.1.0 up to 26.10.13-01 (25.07.10 LTS before v22) allows a sender holding valid push-publishing credentials to write files outside the bundle directory on the receiving server, leading to remote code execution as the dotCMS service account. The bundle file name supplied with the upload was used without validation. Exploitation requires push-publishing credentials, for example a weak, shared or leaked endpoint key, or a malicious or compromised sending server. Fixed in 26.10.19-01 and later, and in 25.07.10 LTS v22. The receiver now accepts only a plain bundle file name ending in .tar.gz that resolves directly inside the bundles directory, and rejects invalid bundle identifiers before processing.
Improper authorization in the dotAI embeddings endpoint (POST /api/v1/ai/embeddings) in dotCMS before 26.10.23-02 allows any authenticated backend user, without administrator or Scripting Developer rights, to submit a Velocity template that the server evaluates as the system user with the full set of template tools. A low-privilege user can use this to read other accounts' password hashes and configuration secrets, access content with system privileges, and make outbound HTTP requests from the server.
Fixed in 26.10.23-02 and later. The endpoint now requires the CMS Administrator role and refuses other callers before the template is evaluated.
Improper authorization in the Login As feature (/api/v1/users/loginas) in dotCMS versions before 26.10.28-03 allows an authenticated backend user who holds the Login As role, but is not an administrator, to impersonate an Administrator or CMS Administrator account and gain full administrative access. The same versions placed no upper limit on the lifetime of API tokens a user could issue for themselves. Fixed in 26.10.28-03 and later. Login As to an administrator account now also requires the impersonating user to be an administrator (property LOGINASADMINREQUIRESADMIN, default true), newly issued API tokens are capped by json.web.token.max.allowed.expiration.days (default now 365 days), and an invalid token network restriction is rejected instead of producing an unrestricted token.
Improper privilege management in the Velocity viewtools $cmsuser, $contents, $categories and $config in dotCMS before 26.10.28-02 allows a backend user with the Scripting Developer role (for example through /api/vtl/dynamic), or any user allowed to author Velocity code that the server renders, to load any user account, including administrators, and pass it to the raw content API as the authorizing user. This lets a user without content permissions read and publish any content with CMS Administrator authority. The same tools exposed other accounts' credential material (stored password hashes and pending password-reset tokens), which can lead to account takeover, and configuration values such as DOT-prefixed deployment secrets.
Fixed in 26.10.28-02 and later. $cmsuser lookups now return a read-only profile without credential fields, the raw content and category API accessors are no longer exposed to templates, and $config withholds credential-named properties.
The UtilMethods.getURL() method, which is exposed to Velocity templates as $UtilMethods, did not restrict the URL scheme or the destination host and returned the response body into the rendered page. In dotCMS versions before 26.08.12-01, 25.07.10 LTS before v18, and all 24.12.27 LTS and 24.04.24 LTS releases, an authenticated back-end user who can edit templates or containers, but is not an administrator, could read any local file the dotCMS service account can access, including process environment data that can expose database, mail, SSO and initial administrator credentials, and could make full-read server-side requests to loopback, private-network and cloud-metadata addresses. Fixed in 26.08.12-01 and later, and in 25.07.10 LTS v18. getURL now accepts only http and https, rejects internal and non-routable resolved addresses, no longer follows redirects, and logs each blocked request.
The GraphQL response cache for /api/v1/graphql in dotCMS before 26.10.23-02 (25.07.10 LTS before v23) stored responses under a key built only from the request body or a client-supplied cache key, without the caller's identity or request context, and looked entries up before authentication. An unauthenticated requester could therefore receive a response that had been cached for a privileged user, disclosing permission-restricted content. Unauthenticated callers could also poison or invalidate cache entries, for example causing content cached for one site or language to be served for another, and request unbounded cache lifetimes.
Fixed in 26.10.23-02 and later, and in LTS 25.07.10 v23 and later. The cache key is now derived on the server from the request body, the caller's credential and the request context (site, language, variant, persona and page mode), a client-supplied cache key only adds a namespace to it, client-requested lifetimes are capped by cache.graphqlquerycache.maxseconds (default 3600 seconds), and only callers presenting a credential can clear an entry.
Insufficient restrictions on Velocity view tools during content field rendering in dotCMS versions through 26.10.29-01 allow an authenticated backend user who can create and publish content to place Velocity in a content field that, whenever the content is rendered for any visitor (including anonymous GraphQL and page requests), reads server configuration values and environment-supplied secrets ($config and $webapi.getConfigVar), reads content the author has no permission to view ($filetool), and lists protected web application directories ($macro). In the same versions the Link Checker follows links placed in content to private network and cloud metadata addresses without the private-subnet check, and any logged-in backend user could start a check and read its results. Through 26.11.11-01, users with access to the Link Checker tool could also see broken-link records for content they have no permission to read, including the name and email address of the user who last edited it, because the records were loaded as the system user. Fixed in 26.11.02-01 and later: configuration readers now return only properties explicitly allowed for templates, the file, macro and mailer tools are removed from field rendering unless the content was last modified by a CMS Administrator or Scripting Developer, protected folders are refused, and the Link Checker applies the private-subnet check to every request and redirect and requires access to the Link Checker tool. In 26.11.17-01 and later, the Link Checker also returns only the broken links of content the requesting user can read and no longer shows editor email addresses.
Missing authorization in the log tail REST endpoint (TailLogResource, GET /api/v1/logs/{fileName}/tail) in dotCMS versions before 26.10.20-01 (25.07.10 LTS before v21) allows any authenticated back-end user, without the CMS Administrator role or access to the Maintenance tool, to stream server log files such as dotcms.log. Log files can contain sensitive information, so this can lead to information disclosure and, in some configurations, privilege escalation. Fixed in 26.10.20-01 and later, and in 25.07.10 LTS v21. The endpoint now requires the CMS Administrator role and access to the Maintenance portlet, matching the log file listing endpoint.
Insertion of sensitive information into a log file in the push publishing receiver in dotCMS versions prior to 26.10.22-01, and 25.07.10 LTS prior to v23, causes both the expected and the presented endpoint key credential to be written to the application log at INFO level on every push publishing request authenticated with an endpoint key rather than a JSON Web Token. Anyone who can read the application logs can reuse the logged value to authenticate to the receiver as a trusted sending endpoint and push content bundles to it. Fixed in 26.10.22-01 and later, and in 25.07.10 LTS v23. The log statements were removed (from 26.10.20-01) and the endpoint key is now compared in constant time (from 26.10.22-01).
Insertion of sensitive information into a log file in the push publishing receiver (for example POST /api/bundlePublisher/publish) in dotCMS versions prior to 26.10.20-01, and 25.07.10 LTS prior to v23, causes the complete Authorization header of inbound push publishing requests, including a valid JSON Web Token, to be written to the application log at INFO level. Anyone who can read the application logs, log shipping or SIEM pipelines, or support bundles can reuse a logged token to impersonate its owner, typically the administrator account used for push publishing, until the token expires or is revoked. Fixed in 26.10.20-01 and later, and in 25.07.10 LTS v23. The log statements that wrote the header, the parsed token and related authentication details were removed.
Missing authorization in the legacy DWR PermissionAjax methods resetAssetPermissions and saveAssetPermissions in dotCMS versions before 26.10.19-01 (25.07.10 LTS before v23) allows any authenticated back-end user, including one with no tool access, to delete all individual and inheritable permissions on an asset they can read, without holding the Edit Permissions permission. After a reset, the asset and its children inherit permissions from the parent folder or site, which can widen access, for example by making restricted content publicly readable, or lock editors out. Fixed in 26.10.19-01 and later, and in 25.07.10 LTS v23. These methods now require Edit Permissions on the asset and log refused calls to the security log.
Missing authorization in the folder move operation (FolderAPI.move) in dotCMS versions before 26.10.22-01, and 25.07.10 LTS before v23, allows an authenticated back-end user who has only Read permission on a folder, plus Add Children permission on another folder or site, to move that folder and everything beneath it to a location they control. Pages, files, links and content under the moved folder stop resolving at their original URLs, and child assets without their own permissions then inherit permissions from the new parent, which can give the user edit and publish rights over content they could previously only read. The issue is reachable through WebDAV and the legacy folder action. Fixed in 26.10.22-01 and later, and in 25.07.10 LTS v23 and later: moving a folder now requires Edit permission on the folder being moved, in addition to Add Children permission on the destination.
Improper authorization in the Site Search AJAX action in dotCMS versions before 26.10.29-01 allows an authenticated backend user who has access only to the Site Search tool, and not to the Maintenance tool, to run content index management commands, including creating, deleting, clearing, closing and deactivating content indexes, which can take content search and delivery offline. Fixed in 26.10.29-01 and later. The Site Search action now serves only its own site search commands and refuses all others.