Computer Networks - Undergraduate Quiz
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)Accept: text/html, application/jsonContent-Type: text/html; charset=UTF-8Server: Apache/2.4.41 (Ubuntu)
GET /index.html HTTP/1.1/delete-user?id=123. Identify the security vulnerabilities in this approach and explain why this violates HTTP principles.<img src="http://example.com/delete-user?id=123"> on their website. When a logged-in user visits that site, their browser automatically sends the GET request, deleting their account without their knowledge [^16^].
HTTP/1.1 200 OK
Server: Apache/2.4.41 (Ubuntu)
X-Powered-By: PHP/7.4.3
Content-Type: text/html; charset=UTF-8
Set-Cookie: sessionid=abc123; Path=/
Cache-Control: public, max-age=3600
Content-Length: 1240
Server header reveals the exact server software (Apache 2.4.41) and operating system (Ubuntu). This information helps attackers identify known vulnerabilities specific to these versions [^11^].X-Powered-By header exposes that PHP version 7.4.3 is being used. This is valuable reconnaissance data for attackers looking for PHP-specific vulnerabilities.Set-Cookie header sets a session ID without the following security flags:Set-Cookie: sessionid=abc123; Path=/; HttpOnly; Secure; SameSite=StrictCache-Control: public allows the response to be cached by any intermediate proxy, even if the content is user-specific or sensitive. Combined with a session cookie, this could lead to session information being cached in shared proxies.Cache-Control: private, no-store for responses containing sensitive data or cookies.{"email": "new@example.com"} vs. all 20 fields) [^17^]. This reduces bandwidth usage and improves performance on mobile or slow connections.application/merge-patch+json) for PATCH operations to ensure predictable behavior [^17^].