Description

DESCRIPTION:
Liferay doesn't properly sanitize name of user agent while creating "Forget Password" emails sent from the portal.
User-Agent HTTP header is wrapped by default to the forget password HTML based message (so also CSRF is possible, but it is likely that CSRF attempt will be blocked by Mail Agent).
This can lead to extreamly dangerous phishing attacks (email which contains malicious content originates from the targeted portal !!!).
Attacker using credibility given by origin of email can easily embed instructions for the victim (f.e. forwarding email to some address - email contains new password for victims account !!!).

ATTACK IMPACT:
From privileges escalation to sending abusive content from the targeted portal to it's users (loosing of credibility by institution running portal).

ATTACK CONSTRAINTS:
Sign In -> Forgot Password feature turned on, having at least one email of portal user (since Liferay suffers email guessing flow, it is not hard to get one).
NOTE: Attack must set to User-Agent HTTP header before session is
created (so User-Agent must present itself with attack from the
beginning of User-Agent <-> Server interaction) !!!