Skip to content
EnglishFrançais

Platforms / Liferay

Liferay security scan

A Liferay security scan is the CMS Security Audit of the custom modules, client extensions, templates, Objects and configuration of a Liferay DXP project.

The CMS Security Scanner reads the custom code of a Liferay DXP 7.0 to 7.4 or quarterly release project, on self-hosted, Liferay PaaS or Liferay SaaS. AI agents read the modules and client extensions, and a CMS Security Consultant confirms each finding.

Request a scanSee a sample report

Versions

Liferay DXP 7.0 to 7.4 and the quarterly releases, self-hosted, PaaS and SaaS

Code read

Java, JSP, FreeMarker, Groovy and client extension code in JavaScript, TypeScript and microservice languages

What we need

The Liferay Workspace or build repository, client extensions, exported Objects, workflows and templates, and configuration with secret values removed

Report

One finding per issue, with its entry point, its severity and a fix for your developers

How Liferay receives a request

  • Liferay DXP runs custom Java code as OSGi modules inside the portal, and each module declares its components through OSGi Declarative Services.
  • A portlet request goes to an MVC command that the portal finds through its mvc.command.name property.
  • Service Builder services and REST Builder APIs answer HTTP calls under /api/jsonws and /o/, and each one must check permissions itself.
  • Client extensions run outside the portal process, in the browser or as microservices that call Liferay back with OAuth 2 tokens.
  • On Liferay SaaS, custom OSGi modules and Groovy are not allowed, so custom code is mostly client extensions, Objects, fragments and templates.

Entry points reviewed

The scan lists every construct that lets a request, a user, a job or another system reach custom code, and records the access control in front of it.

CategoryConstruct in your codeRisk
Portlets and MVC commandsMVCPortlet classes, MVCActionCommand, MVCRenderCommand and MVCResourceCommand components, portlet filtersEach command reads request parameters, and a command without its own permission check is open to every user who sees the portlet.
Headless APIsREST Builder resources from rest-openapi.yaml, custom JAX-RS applications and GraphQL under /o/These APIs are the main integration surface, so the scan checks authentication, OAuth scopes and permission checks in each resource.
JSON web services and Service BuilderRemote *ServiceImpl methods under /api/jsonws, ModelResourcePermission and PermissionChecker callsEvery public remote method becomes an HTTP endpoint, and Liferay expects the permission check inside that method.
Service overrides and legacy hooksServiceWrapper components, StrutsAction components, JSP overrides and dynamic includesAn override can remove a check that the original product code had.
Servlets and filtersOSGi HTTP whiteboard servlets and filters, BaseFilter subclasses and servlets in WAR pluginsServlets run outside the portlet permission model, so authentication and authorization are the task of the custom code.
Authentication extensionsAutoLogin, AuthVerifier and Authenticator classes, SAML, OpenID Connect and header-based SSOA custom login component decides who the user is, and one vulnerability there opens every other entry point.
Frontend client extensionsCustom element, IFrame and theme JavaScript client extensions, page fragmentsThis code runs in the browser of every visitor, so the scan checks DOM output, token handling and calls to Liferay APIs.
Microservice client extensionsMicroservice client extensions, Object action and workflow action endpoints, OAuth headless server and user agent profilesThese services receive calls from Liferay and must validate the token and scope of each call.
ObjectsObject definitions and permissions, generated headless APIs, API Builder endpoints, Groovy and webhook actions, validationsWrong Object permissions expose records through the generated API, and Groovy actions run with server privileges.
Kaleo workflowsWorkflow definitions with script elements, custom ActionExecutor and TaskAssignee classesWorkflow scripts run on content that untrusted users submit.
Background and event codeSchedulerJobConfiguration, MessageListener, ModelListener and UpgradeProcess classesThis code runs without a user request, often with full rights, on data that users stored earlier.
TemplatesFreeMarker web content templates, Application Display Templates, fragment and theme templatesTemplates decide which output is escaped, and some template variables give access to Java objects.
Forms, search and importForms data providers, custom indexers and query contributors, Search Blueprints, LAR export and import handlersA data provider calls a URL, a custom query can skip permission filtering and an import reads a user-supplied archive.
Configuration and scriptsportal-ext.properties, OSGi .config files, client-extension.yaml, batch files and Script Console scriptsConfiguration decides which endpoints are open and which hosts are trusted, and it can hold secrets.

Dangerous operations traced

The scan traces user data from each entry point to the operations below.

OperationWhat the scanner looks for
SQL injectionCustom SQL, JDBC through DataAccess and DynamicQuery SQL restrictions built from user input instead of bound parameters.
Missing permission checkRemote services, REST resources and MVC commands that call *LocalService methods without ModelResourcePermission or PermissionChecker.
Insecure direct object referenceEntities loaded by an ID from the request without a check of site, company and permissions.
Cross-site scriptingJSP and FreeMarker output without the right escaping, and innerHTML in client extensions and fragments.
Template and script executionUser data in FreeMarker template code, re-enabled restricted template variables, Groovy engines and system commands.
Cross-site request forgeryState-changing action URLs, servlets and APIs that accept requests without the p_auth token or token-based authentication.
Server-side request forgeryHTTP clients, webhook actions and Forms data providers where a user controls the destination host.
Deserialization and XMLObjectInputStream, polymorphic JSON typing, and XML parsers that allow external entities in imports and web content.
Files, paths and redirectsFile names from users in file and ZIP code, and redirect or backURL parameters sent to any host.
SecretsPasswords, API keys and OAuth client secrets in portal-ext.properties, OSGi configuration, client extension files or scripts.

Dependencies and configuration checked

  • Liferay DXP release from the workspace product or the release.dxp.bom version, compared with Liferay known vulnerabilities
  • portal-kernel and the Liferay APIs that custom modules compile against
  • Third-party jars that modules embed, such as Jackson, Apache Commons, HTTP clients, XML parsers and document libraries
  • Older copies of libraries that the portal already provides, embedded inside a custom module
  • package.json and lock files of client extensions, and the build files of microservices
  • Each component compared with public advisories, with a check of whether custom code reaches the vulnerable part
  • JSON web service discovery and path filters in portal-ext.properties
  • Service access policies, CORS settings and the scopes of OAuth 2 applications
  • The redirect.url.security.mode property and the list of trusted redirect hosts
  • FreeMarker restricted variables and Script Management settings for workflow and Objects
  • Object permissions and the roles that reach generated Object APIs
  • Secrets in configuration folders, client-extension.yaml, LCP.json and environment files

Typical findings

Liferay security advisories show the vulnerability classes that the scan looks for in custom code.

  • Deserialization through JSON web services, the class of CVE-2020-7961
  • Missing authorization on an API, such as CVE-2025-62256
  • Cross-site request forgery on headless APIs, such as CVE-2025-62258
  • Stored and reflected cross-site scripting, such as CVE-2025-62267
  • Open redirect, such as CVE-2025-43767
  • Insecure default configuration, such as CVE-2025-62266
  • Sensitive data exposed to FreeMarker templates, such as CVE-2025-43825
  • Unbounded API page sizes, such as CVE-2025-62260

Frequently asked questions about Liferay

Which Liferay code does the scan review?

The scanner reviews the custom code of the project, not the Liferay product. This includes OSGi modules, client extensions, templates, fragments, Objects, Kaleo workflows and configuration. CMS Security Consultants review each finding before the report.

Does the scan work with Liferay SaaS and Liferay PaaS?

Yes. Liferay SaaS does not allow custom OSGi modules, so the scan reads client extensions, Objects, fragments, templates and configuration there. On PaaS and self-hosted installations it also reads the OSGi modules.

Which Liferay versions does the scan cover?

The scan covers Liferay DXP 7.0 to 7.4 and the DXP quarterly releases. It compares the release of your project with the Liferay known-vulnerabilities list.

Why are permission checks a main focus of a Liferay review?

Liferay expects custom code to check permissions in remote services, REST resources and MVC commands. A missing check lets a user read or change the records of other users, and functional tests rarely show it.

Are Groovy scripts in workflows and Objects in scope?

Yes. Groovy can run in Kaleo workflow definitions, Object actions, Object validations and the Script Console. The scan checks which scripts exist, what data reaches them and whether scripting settings are wider than needed.

Does the scan need access to the production portal?

No. The scan needs the source code, client extensions, exported Objects, workflows and templates, and configuration with secret values removed. It does not need production access, a database dump or user content.

Other platforms

The same method, report and consultants apply to each platform.

Request a Liferay security scan

Tell us how to reach you. A CMS Security Consultant will contact you to plan your Liferay scan.