
Liferay Community Edition Misconfiguration Exposes Plaintext Passwords in Government Systems via CWE-319
A Russian government information system built on Liferay Community Edition sent user passwords in plaintext emails due to default notification templates and unhardened configuration settings. The portal used Liferay's built-in MailEngine, which retained the hardcoded liferay.com domain in Message-ID headers and left the [$PORTAL_URL$] variable pointing to localhost:8080. Instead of hashing the new password, the custom password-change portlet triggered the default account-creation notification that embedded the actual password via the [$PASSWORD$] macro. This exposed credentials to anyone with access to the recipient mailbox, directly violating CWE-319 requirements for protecting sensitive data in transit. The root cause was the failure to remove the macro from password-change templates and override portal-ext.properties values before deployment. Administrators can remediate the issue in minutes by editing Control Panel notification settings and setting web.server.host, web.server.https.port, and mail.string.id to production values.
HabrOct 30, 2026Translated from Russian