CVE-2022-42121: SQL Injection Vulnerability in com.liferay.layout.page.template.service and com.liferay.portal:release.dxp.bom

Summary

15/11/2022
Yes i
High
8.8

CVE-2022-42121: Liferay Portal and Liferay DXP Vulnerable to SQL Injection via the Layout Module. Affects com.liferay:com.liferay.layout.page.template.service versions < 4.0.17. Fixed in 4.0.17. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The packages com.liferay.layout.page.template.service and com.liferay.portal:release.dxp.bom are part of the Liferay Portal and Liferay DXP ecosystems, which are widely used for building enterprise web applications. These packages provide essential services for layout management and portal functionalities. However, they have been identified to contain a critical SQL injection vulnerability that could allow attackers to execute arbitrary SQL commands, posing significant risks to data integrity and security.

Vulnerability Detail

A SQL injection vulnerability exists in the Layout module of Liferay Portal versions 7.1.3 through 7.4.3.4 and Liferay DXP versions 7.1 before fix pack 27, 7.2 before fix pack 17, 7.3 before service pack 3, and 7.4 GA. This vulnerability allows remote authenticated attackers to inject malicious SQL code through a crafted payload in a page template's 'Name' field. The potential ramifications include unauthorized access to sensitive data, data manipulation, and complete system compromise.

How To Fix

Minimum fixed version

4.0.17

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not feasible, consider implementing input validation and sanitization on the 'Name' field of page templates to mitigate the risk of SQL injection. This can be done by ensuring that only expected characters are allowed in the input.

Conclusion

The SQL injection vulnerability CVE-2022-42121 poses a significant risk to Liferay Portal and Liferay DXP users. It is crucial to update to the patched versions of the affected packages to safeguard against potential attacks. Implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for com.liferay:com.liferay.layout.page.template.service →

Share this vulnerability

FAQ

CVE-2022-42121 is a SQL injection vulnerability found in specific versions of Liferay Portal and Liferay DXP, allowing attackers to execute arbitrary SQL commands.

Affected versions include Liferay Portal 7.1.3 through 7.4.3.4 and Liferay DXP 7.1 before fix pack 27, 7.2 before fix pack 17, 7.3 before service pack 3, and 7.4 GA.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

The vulnerability can lead to unauthorized access to sensitive data, data manipulation, and potentially a complete system compromise.

Update the packages in your pom.xml file to the patched versions: com.liferay.layout.page.template.service to 4.0.17 and com.liferay.portal:release.dxp.bom to the respective fixed versions.

How To Fix

Minimum fixed version

4.0.17

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback