You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A URL redirection vulnerability exists in UJCMS 9.6.3 due to improper validation of URLs in the upload and rendering of new block / carousel items. This vulnerability allows authenticated attackers to redirect unprivileged users to an arbitrary, attacker-controlled webpage. When an authenticated user clicks on the malicious block item, they are redirected to the arbitrary untrusted domains, where sensitive tokens, such as JSON Web Tokens, can be stolen via a crafted webpage.
After uploading the block item, authenticate as another user and navigate to the home page where the carousel is displayed. Click on the malicious block / carousel item.
Observe the redirection to http://localhost:5000/evil.html and the exfiltration of the jwt-access-token to the attacker’s server (in this case, localhost:8888).
Root Cause:
The application fails to validate and sanitize URLs provided during block item creation. This allows attackers to input arbitrary URLs that redirect users to malicious attacker controlled domains. Additionally, the lack of HttpOnly flag on sensitive cookies such as jwt-access-token allows JavaScript to access these tokens, exacerbating the impact.
Mitigation Recommendations:
URL Validation:
Implement strict validation for URLs provided in block items. Ensure URLs are restricted to trusted domains and use a whitelist approach.
Secure Cookie Attributes:
Set the HttpOnly flag on sensitive cookies to prevent access via JavaScript. Use the Secure flag to restrict cookies to HTTPS connections.
Content Security Policy (CSP):
Enforce a CSP to prevent the execution of inline JavaScript and restrict resource loading to trusted domains.
The text was updated successfully, but these errors were encountered:
Description:
A URL redirection vulnerability exists in UJCMS 9.6.3 due to improper validation of URLs in the upload and rendering of new block / carousel items. This vulnerability allows authenticated attackers to redirect unprivileged users to an arbitrary, attacker-controlled webpage. When an authenticated user clicks on the malicious block item, they are redirected to the arbitrary untrusted domains, where sensitive tokens, such as JSON Web Tokens, can be stolen via a crafted webpage.
Affected Component:
/cp/#/content/block-item
Type of Vulnerability:
CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Impact:
Steps to Reproduce / PoC:
http://localhost:8080/cp/#/content/block-item/
.localhost:8888
and wait for cookie exfiltration.http://localhost:5000/evil.html
).http://localhost:5000/evil.html
and the exfiltration of the jwt-access-token to the attacker’s server (in this case,localhost:8888
).Root Cause:
The application fails to validate and sanitize URLs provided during block item creation. This allows attackers to input arbitrary URLs that redirect users to malicious attacker controlled domains. Additionally, the lack of
HttpOnly
flag on sensitive cookies such as jwt-access-token allows JavaScript to access these tokens, exacerbating the impact.Mitigation Recommendations:
URL Validation:
Implement strict validation for URLs provided in block items. Ensure URLs are restricted to trusted domains and use a whitelist approach.
Secure Cookie Attributes:
Set the
HttpOnly
flag on sensitive cookies to prevent access via JavaScript. Use the Secure flag to restrict cookies to HTTPS connections.Content Security Policy (CSP):
Enforce a CSP to prevent the execution of inline JavaScript and restrict resource loading to trusted domains.
The text was updated successfully, but these errors were encountered: