session-fixation

session-fixation is a skill for Claude Code, Codex from SecurityTalent/bugskill-ai. It costs 116 tokens per session (2,089 once invoked), scanned A, original, MIT.

A web security check for login sessions and session tokens. A session token is the value a server uses to remember that a browser is logged in.

In plain words
What is it for?
Use it to review token changes after login, cookie settings, HTTPS use, URL parameters, and whether old or predictable tokens remain valid.
Why use it?
It finds cases where an attacker can set a victim's token before login, reuse it after login, or steal it because it travels insecurely or appears in URLs. Those flaws can allow account impersonation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to review token changes after login, cookie settings, HTTPS use, URL parameters, and whether old or predictable tokens remain valid.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/securitytalent/bugskill-ai/session-fixation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SecurityTalent/bugskill-ai --skill session-fixation
Clone the repo
git clone --depth 1 https://github.com/SecurityTalent/bugskill-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-fixation

README.md
[![agentmods](https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/session-fixation/github.svg)](https://agentmods.dev/skills/securitytalent/bugskill-ai/session-fixation)
Your own site
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/session-fixation"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/session-fixation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-fixation

Your own site · 80×15
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/session-fixation"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/session-fixation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,089 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.02089
Opus 5.5 $0.00046 $0.00836
Sonnet 5.5 $0.00023 $0.00418
Haiku 4.5 $0.00012 $0.00209

Measured 2mo ago against content hash be6f2c58b892, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-fixation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

PRE_TOKEN=$(curl -s -c /tmp/pre_cookies.txt "https://TARGET/login" \
Awesome-Claude-Code-Agent-Skills/03-Authentication-and-Access-Control/session-fixation/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Fixation and Session Token Exposure

What Is Broken and Why

Session fixation occurs when an application authenticates a user but retains the pre-authentication session token rather than issuing a fresh one. An attacker who plants a known token (via URL parameter, XSS, or network manipulation) can then authenticate as the victim by using that same token once the victim logs in. Session token exposure extends the attack surface by allowing tokens to be harvested from HTTP traffic, proxy logs, browser history, and caches when tokens are transmitted without encryption or appear in GET request URLs. Predictable session tokens that can be forged complete the trifecta of session management failures.

Key Signals

  • Application does not set a new Set-Cookie header upon successful authentication
  • Pre-login session token remains usable in authenticated requests post-login
  • Session ID appears in URL query string: ?JSESSIONID=... or ?session=...
  • Session ID transmitted over HTTP (not HTTPS) at any point
  • Set-Cookie lacks Secure flag on session cookies
  • Set-Cookie lacks HttpOnly flag on session cookies
  • Session cookies set without SameSite attribute
  • Session ID predictable: sequential, timestamp-based, or short (< 50 chars / < 128-bit entropy)
  • Cache-Control headers on authenticated pages do not include no-store
  • ASP.NET Forms Authentication cookies (.ASPXAUTH) used without server-side session store
  • Set-Cookie: __Host- or __Secure- prefixes absent (weaker binding guarantees)

Methodology

  1. Pre-auth token capture: Visit the login page without authenticating; record all cookies issued (note Set-Cookie headers, cookie names, values).
  2. Authentication with token intact: Submit valid credentials while preserving the pre-login cookie; inspect response for Set-Cookie headers.
  3. Fixation test: If no new session cookie issued, the pre-auth token has been elevated to an authenticated session — fixation confirmed.
  4. Forced cookie test: Using two accounts (attacker + victim), perform the 9-step forced cookie scenario: snapshot pre-login cookies, authenticate as victim, restore pre-login snapshot, attempt authenticated action, then swap and authenticate as attacker using victim's pre-login cookies.
  5. Token randomness analysis: Collect 50+ session tokens under identical conditions within a 50ms window; load into Burp Sequencer for statistical analysis.
  6. Transport exposure: Force HTTP access after authentication; observe if session cookie is transmitted. Check for Secure flag.
  7. GET parameter exposure: Review all URLs and server logs for session IDs in query strings.
  8. Cache exposure: Check Cache-Control, Pragma, and Expires headers on authenticated responses.

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 170 lines · 116 tokens per session scan A be6f2c58b892

Subscribe to this mod's changes

session-fixation is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 2mo ago), licensed MIT. It adds 116 tokens to every session and 2,089 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.

Related

session-fixation compared with skills from other repositories

session-fixation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
session-fixationSecurityTalent/bugskill-aiSkill132mo agoMITA116Claude Code, Codex
architecture-patternsgarrettw/php-arch-skillsSkill172d agoMPL-2.0A77Claude Code, Codex
event-sourcinggarrettw/php-arch-skillsSkill172d agoMPL-2.0A133Claude Code, Codex
hub-agent-setupGiskard-AI/giskard-skillsSkill63d agoApache-2.0A82Claude Code
php-domain-modelinggarrettw/php-arch-skillsSkill172d agoMPL-2.0A55Claude Code, Codex
application-layergarrettw/php-arch-skillsSkill172d agoMPL-2.0A67Claude Code, Codex
persistence-patternsgarrettw/php-arch-skillsSkill172d agoMPL-2.0A58Claude Code, Codex