Analysis:
During the analysis, it was observed that the application was generating an inadequate cookie path attribute for the authentication cookie which was used for maintaining the user's session. Please refer to the below-provided evidence and proof of concept.
Impact:
Cookie Path attributes specify the validity of the cookie to a specific URL. The cookies can be easily stolen from the insecure/incorrect URL path if the path attribute is not set properly. The path attribute is used with the domain attribute to provide more security. If the path attribute is set to "/myapp", the cookie will only be sent to the specified domain on the web server. An attacker may steal the cookies from a malicious URL if the cookie path is insecurely/inadequately specified. This may lead to various attacks such as session hijacking, session replay, etc.
Recommendation:
· Set the cookie path attribute specific to “/myapp/”.
· Apply proper validation to the cookie path attribute.
Comments
Post a Comment