# CVE-2021-25979: Apostrophe - Insufficient Session Expiration

> Attackers can maintain access via compromised devices because disabling accounts or changing passwords does not invalidate existing sessions in Apostrophe CMS.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Nov 2021
- **Updated:** 30 Apr 2025
- **Also known as:** GHSA-9j9m-8wjc-ff96

## What is CVE-2021-25979?

CVE-2021-25979 is a critical vulnerability in Apostrophe , published on 8 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Apostrophe CMS versions prior to 3.3.1 did not invalidate existing login sessions when disabling a user account or changing the password, creating a situation in which a device compromised by a third party could not be locked out by those means. As a mitigation for older releases the user account in question can be archived (3.x) or moved to the trash (2.x and earlier) which does disable the existing session.

Weakness: CWE-613 (DEPRECATED: Insufficient Session Expiration)

## Which versions are affected by CVE-2021-25979?

2 open source packages ship an affected version, including apostrophe. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `apostrophe` | npm | From 2.63.0 | 3.4.0 |
| `apostrophe` | npm | From 2.63.0 | 3.4.0 |

Products: Apostrophecms Apostrophecms.

## How do I fix CVE-2021-25979?

Upgrade apostrophe to 3.4.0 or later.

## Is CVE-2021-25979 being exploited?

There is no known exploitation of CVE-2021-25979 in the wild and no public exploit code.

## Other vulnerabilities in Apostrophe 

- [CVE-2026-35569](https://insights.sbomify.com/CVE-2026-35569/): ApostropheCMS: Stored XSS in SEO Fields Leads to Authenticated API Data Exposure in ApostropheCMS (high 8.7)
- [CVE-2026-32730](https://insights.sbomify.com/CVE-2026-32730/): ApostropheCMS MFA/TOTP Bypass via Incorrect MongoDB Query in Bearer Token Middleware (high 8.1)
- [CVE-2026-40186](https://insights.sbomify.com/CVE-2026-40186/): ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements (medium 6.1)
- [CVE-2026-33889](https://insights.sbomify.com/CVE-2026-33889/): ApostropheCMS: Stored XSS via CSS Custom Property Injection in `@apostrophecms/color-field` Escaping Style Tag Context (medium 5.4)
- [CVE-2021-25978](https://insights.sbomify.com/CVE-2021-25978/): Apostrophe - XSS (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-25979 and fix it if it is affected.

What it is: CVE-2021-25979 is a critical vulnerability in Apostrophe , published on 8 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-25979 in the wild and no public exploit code.

Affected packages and fixed versions:
- apostrophe (npm): affected from 2.63.0; fixed in 3.4.0
- apostrophe (npm): affected from 2.63.0; fixed in 3.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-25979/ (Markdown: https://insights.sbomify.com/CVE-2021-25979/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-25979
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-25979
- OSV: https://osv.dev/vulnerability/CVE-2021-25979

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-25979/
Summaries are generated and may contain mistakes; the official description above is the record.
