Navigation
Remote · Available for Projects & Roles

Building web apps, mobile platforms, and Agentic AI systems for businesses and startups.

CybersecurityAug 20, 20241 min read

Account Takeover via Response Manipulation: Why Server-Side Validation Matters

A concise breakdown of how trusting client-side HTTP responses during a password reset flow can lead to full account takeover—and how to prevent it.

HS

Himanshu Sharma

Independent Software Engineer

The Vulnerability#

During a security review of a password-change workflow, I tested submitting an incorrect current password. The server correctly returned 401 Unauthorized:

json
{
  "status": "error",
  "message": "current password is incorrect"
}

However, because the frontend trusted the HTTP response body to decide whether to proceed, intercepting and rewriting that response to 200 OK with "status": true allowed the password change to complete without knowing the current password.


Business Impact#

If an attacker gains temporary session access, response manipulation allows a silent account takeover—locking out the legitimate user permanently.


The Fix#

  1. Enforce validation on the server: Never let the UI decide whether an authentication step succeeded.
  2. Gate state changes in the backend: Password updates must verify the hashed current password inside the same server-side transaction.

I responsibly disclosed this finding to the organization. It reinforces a core rule I apply to every system I engineer: security lives on the server, never in the browser.

Continue Reading