Skip to content

Session cookie missing HttpOnly, SameSite, and Secure attributes #871

Description

@ngosang

Labels: security · Severity: Medium

Location: src/webserver/src/WebSocket.cpp:250-255 (CWebSocket::SendHttpHeaders)

snprintf(cookie, sizeof(cookie), "Set-Cookie: amuleweb_session_id=%d\r\n", session_id);

Description: The session cookie is set with no security attributes. HttpOnly would
prevent JavaScript from reading it (mitigating XSS-based theft), and SameSite=Strict would
block the cross-site cookie attachment that makes CSRF (SEC-4) possible.

Impact: Amplifies XSS into session theft.

Suggested fix: Emit amuleweb_session_id=...; HttpOnly; SameSite=Strict (add Secure
when served over HTTPS / behind a TLS-terminating proxy).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions