CVE-2026-25540
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedMastodon is a free, open-source social network server based on ActivityPub. Prior to versions 4.3.19, 4.4.13, 4.5.6, Mastodon is vulnerable to web cache poisoning via `Rails.cache. When AUTHORIZED_FETCH is enabled, the ActivityPub endpoints for pinned posts and featured hashtags have contents that depend on the account that signed the HTTP request. However, these contents are stored in an internal cache and reused with no regards to the signing actor. As a result, an empty response generated for a blocked user account may be served to requests from legitimate non-blocked actors, or conversely, content intended for non-blocked actors may be returned to blocked actors. This issue has been patched in versions 4.3.19, 4.4.13, 4.5.6.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceMastodon versions prior to 4.3.19/4.4.13/4.5.6 have a web cache poisoning vulnerability in ActivityPub endpoints for pinned posts and featured hashtags. When AUTHORIZED_FETCH is enabled, the cache key does not include the signing actor, causing cached responses for one user (including blocked users receiving empty responses) to be incorrectly served to different users.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 4.3.19>= 4.4.0, < 4.4.13>= 4.5.0, < 4.5.6CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- None
- Availability
- Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check Mastodon versionAccess the admin dashboard at /admin/dashboard and locate the version number displayed, or query the instance API at /api/v1/instance to retrieve the 'version' field in the response.Affected if The installed version is less than 4.3.19, OR falls between 4.4.0 and 4.4.12 inclusive, OR falls between 4.5.0 and 4.5.5 inclusive.
-
Verify AUTHORIZED_FETCH is enabledCheck the Mastodon environment configuration by examining the AUTHORIZED_FETCH environment variable, or inspect the admin settings at /admin/settings/profile to see if the option to 'Allow blocked users to federate' is disabled (which indicates AUTHORIZED_FETCH is active).Affected if AUTHORIZED_FETCH is set to true or enabled in the configuration.
-
Confirm ActivityPub endpoints are accessibleVerify that ActivityPub endpoints for pinned posts (/users/{username}/featured) and featured hashtags (/api/v1/featured_tags) are publicly reachable or accessible to authenticated users on the instance.Affected if These endpoints are accessible and the instance processes requests to them.
The instance is affected if it runs a vulnerable Mastodon version AND has AUTHORIZED_FETCH enabled, allowing cached ActivityPub responses for pinned posts or featured hashtags to be incorrectly served across different users.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped4.3.194.4.134.5.6
Upgrade to Mastodon version 4.3.19, 4.4.13, 4.5.6 or later to patch the vulnerability. As a compensating control, consider disabling AUTHORIZED_FETCH if operationally feasible.
Mastodon 4.3.19, 4.4.13, or 4.5.6 (choose the release line matching your current major.minor version)
- Identify your current Mastodon version using `git describe --tags` or checking the VERSION file
- Create a backup of your Mastodon database and file storage before proceeding
- Run `git fetch --tags` to fetch the latest tags from the upstream repository
- Check out the specific fixed version tag: for 4.3.x users run `git checkout v4.3.19`, for 4.4.x users run `git checkout v4.4.13`, for 4.5.x users run `git checkout v4.5.6
- Run `bundle install` to update Ruby dependencies
- Run `RAILS_ENV=production bundle exec rails db:migrate` to apply any new database migrations
- Restart all Mastodon services (web, sidekiq, streaming) to load the patched code
- Verify the upgrade was successful by checking the version in the admin interface or via the API endpoint /api/v1/instance
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation8.0 h
- Implementation16.0 h
- Testing20.0 h
- Review / QA12.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $15,424.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-25540 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-25540 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data