Skip to content

SEC: Access Token Misconfiguration — insecure cookie flags #188

Closed

Description

@vybe

Pentest Finding 3.3.5 — Low (CVSS 2.0)

Location: Frontend cookie handling at http://localhost/

Impact

The application mirrors the Local Storage authentication token into a cookie without Secure or HttpOnly flags:

  • Missing Secure — browser transmits the token in plaintext over HTTP, enabling MitM session hijack on public Wi-Fi
  • Missing HttpOnly — token accessible via document.cookie, expanding XSS attack surface

While the app logic uses Local Storage for API communication, browsers automatically attach cookies to outbound requests, creating a secondary extraction vector.

Remediation

  • Best: Stop mirroring the token into a cookie entirely (if only Local Storage + Bearer header is used)
  • If cookie must be retained: set Secure, HttpOnly, and SameSite attributes
  • Ensure token is only transmitted over HTTPS connections

References

Source: UnderDefense Web Pentest Report, March 2026

Activity

  1. added
    priority-p2
    security
    pentest
    severity-low
    on Mar 26, 2026
  2. added
    status-in-progress
    on May 4, 2026
  3. self-assigned this
    on May 4, 2026
  4. added
    status-in-dev
    and removed
    status-in-progress
    on May 4, 2026
  5. added
    complexity-low
    theme-security
    on Jun 3, 2026
  6. removed
    status-in-dev
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpentestpriority-p2securityseverity-lowtheme-security

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions