CSRF on ae.[redacted].com via /on/demandware.store/Sites-[redacted]_AE-Site/en_AE/Account-SavePreferences (HTTP POST) Leads to Unauthorized Account Manipulation
Summary
Beneath the surface of a seemingly routine preference-saving endpoint lies a silent, unguarded door. The endpoint Account-SavePreferences on ae.[redacted].com accepts POST requests to update a user's account preferences — yet it fails to enforce the very safeguard designed to protect it: the csrf_token. When the csrf_token parameter is stripped away entirely, the server raises no objection. It does not pause, does not verify, does not resist — it simply obeys. Compounding this weakness, the session cookie dwsid is configured with SameSite=None, stripping away the browser's last line of defense against cross-origin requests riding on an authenticated session. The result is a textbook Cross-Site Request Forgery: an attacker can craft a malicious page that, the moment a logged-in victim visits it, silently forges a request on their behalf — rewriting their account preferences without their knowledge, consent, or any visible sign of compromise. No sophisticated exploit chain is required; only a single click, or even just a page load, is enough to turn trust into a vulnerability.
PoC
A working proof-of-concept was hosted and demonstrated at: https://faizhidayatulloh.github.io/index.html. The PoC page contains an auto-submitting HTML form targeting:
POST https://ae.[redacted].com/on/demandware.store/Sites-[redacted]_AE-Site/en_AE/Account-SavePreferences.
Crucially, the form omits the csrf_token field entirely. When an authenticated victim visits the PoC page, their browser — carrying the dwsid session cookie due to its SameSite=None attribute — automatically transmits the forged request. The server, expecting no token verification, processes it as legitimate, and the victim's account preferences are altered without their awareness.
Impact
An attacker can manipulate a victim's account preferences at will, purely through social engineering (e.g., luring the victim to a malicious link), with no interaction beyond a page visit required.