# GHSA-H48F-PXP7-C4MJ: Session fixation

- Database: GitHub
- Severity: low (stated by ghsa, no CVSS score)
- Published: 2026-11-16
- Modified: 2026-11-16

## Tracked as

- [CVE-2026-52803](https://cve.now/CVE-2026-52803.md): Gogs session fixation in sign-in allows account takeover

## Affected versions

- gogs.io/gogs (Go): fixed in 0.15.0

## Description

### Summary
The Gogs application does NOT regenerate session IDs upon successful authentication. This allows an attacker to perform a session fixation attack where they can force a victim to use a known session ID, then hijack the session after the victim logs in.

Vulnerable Code Snippet:
```
// File: internal/route/user/auth.go
func SignInPost(c *context.Context, f form.SignIn) {
    // ... authentication logic ...
    
    // ADD THIS: Regenerate session ID on successful login
    c.Session.RegenerateID(c.Req.Context())
    
    // ... set user session ...
}
```

### PoC
- Attacker obtains the session ID by visiting login page
   → Session: i_like_gogs=c9af1981d493dc56

- Attacker forces the victim to use this session ID via:
   - Social engineering (send link with cookie)
   - XSS on subdomain
   - MITM attack
   - Physical access

- Victim logs in using attacker's session ID
   → Session remains: c9af1981d493dc56

- Attacker uses the same session ID to access the victim's account
   → Complete account takeover achieved!

### Impact
- Account Takeover: Complete compromise of user accounts
- Data Breach: Access to private repositories and sensitive data
- Privilege Escalation: If the admin account is compromised, full system access
- Persistence: Attacker maintains access as long as the session is valid

## References

- https://github.com/gogs/gogs/security/advisories/GHSA-h48f-pxp7-c4mj

Page: https://cve.now/GHSA-H48F-PXP7-C4MJ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
