Cyber Risks · PortSwigger Research

Cookie manipulation (DOM-based)

Summary: DOM-based cookie manipulation occurs when a client-side script writes controllable data, such as data from the URL, into a cookie's value, letting an attacker construct a URL that sets an arbitrary value in another user's cookie. The impact depends on the cookie's role: a cookie controlling behavior like a 'production' versus 'demo' mode setting can lead the user to perform unintended actions, while a session cookie can enable session fixation, where the attacker sets the cookie to a valid token they obtained and hijacks the session during the victim's later interaction.

What you should know: A single crafted URL can plant a valid session token in a victim's cookie and hand the attacker the session, and PortSwigger notes static analysis alone can flag false positives that are not actually exploitable, so the finding needs code and execution-path review to confirm.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related