CVE-2024-34535
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 · uneditedIn Mastodon 4.1.6, API endpoint rate limiting can be bypassed by setting a crafted HTTP request header.
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 · moderate confidenceIn Mastodon 4.1.6, the API endpoint rate limiting mechanism can be bypassed by an attacker who sets a crafted HTTP request header. This allows the attacker to circumvent rate limits designed to prevent API abuse, potentially enabling automated attacks, scraping, or service disruption.
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.1.16>= 4.2.0, <= 4.2.8CVSS 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
- High
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N
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.
-
Determine installed Mastodon versionCheck the version file in the Mastodon installation directory, typically running `cat /home/mastodon/live/VERSION` or `cat /opt/mastodon/VERSION` depending on your installation path. Alternatively, check the About page in the web interface or query the instance's API endpoint.Affected if The installed version is 4.1.x and <= 4.1.16, OR 4.2.x and <= 4.2.8
-
Identify rate limiting configurationLocate the rate limiting configuration file in the Mastodon config directory. Look for `config/initializers/rack_attack.rb` or similar rate limiting middleware configuration files. Check for any rate limit settings in environment configuration files.Affected if Rate limiting is enabled and configured to use an HTTP header for client identification
-
Inspect the rate limiting header in useExamine the rate limiting middleware configuration to identify which HTTP header is used to track client requests for rate limiting purposes. Look for headers such as X-Forwarded-For, X-Real-IP, or custom authentication headers being used as the rate limit key.Affected if The configuration uses a client-supplied HTTP header without proper server-side validation or sanitization
-
Verify header validation existsReview the rate limiting code in the Mastodon source, specifically the part that extracts the client identifier from the HTTP header. Check if there is logic to validate, normalize, or reject manipulated header values before using them for rate limit tracking.Affected if No validation or sanitization is performed on the header value before using it as the rate limit key, allowing attackers to spoof different identifiers
You are affected if your Mastodon version is 4.1.16 or lower, or between 4.2.0 and 4.2.8, AND rate limiting is enabled using an HTTP header that can be arbitrarily set by clients without server-side validation.
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 · scopedThe fix should involve validating and properly handling the HTTP header used to identify clients for rate limiting, ensuring that manipulated headers cannot bypass the rate limiting logic. Consider implementing multiple rate limiting factors and server-side validation.
Mastodon 4.2.9 or 4.1.17
- 1. Backup your Mastodon database and files before upgrading
- 2. Check your current Mastodon version (typically in the admin interface or package.json)
- 3. If running Mastodon 4.2.x, upgrade to version 4.2.9 or later
- 4. If running Mastodon 4.1.x, upgrade to version 4.1.17 or later
- 5. Review release notes for any required migration steps
- 6. Run database migrations if prompted (RAILS_ENV=production bundle exec rails db:migrate)
- 7. Restart all Mastodon services (Puma, Sidekiq, streaming)
- 8. Verify rate limiting is functioning correctly after upgrade
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,408.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-34535 — 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-2024-34535 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