CVE-2021-39226
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 · uneditedGrafana is an open source data visualization platform. In affected versions unauthenticated and authenticated users are able to view the snapshot with the lowest database key by accessing the literal paths: /dashboard/snapshot/:key, or /api/snapshots/:key. If the snapshot "public_mode" configuration setting is set to true (vs default of false), unauthenticated users are able to delete the snapshot with the lowest database key by accessing the literal path: /api/snapshots-delete/:deleteKey. Regardless of the snapshot "public_mode" setting, authenticated users are able to delete the snapshot with the lowest database key by accessing the literal paths: /api/snapshots/:key, or /api/snapshots-delete/:deleteKey. The combination of deletion and viewing enables a complete walk through all snapshot data while resulting in complete snapshot data loss. This issue has been resolved in versions 8.1.6 and 7.5.11. If for some reason you cannot upgrade you can use a reverse proxy or similar to block access to the literal paths: /api/snapshots/:key, /api/snapshots-delete/:deleteKey, /dashboard/snapshot/:key, and /api/snapshots/:key. They have no normal function and can be disabled without side effects.
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 confidenceGrafana snapshots use predictable sequential database keys instead of secure random identifiers, allowing attackers to enumerate and access/delete all snapshots by incrementing the key value. This IDOR vulnerability affects both unauthenticated (view only, or delete if public_mode=true) and authenticated users (view and delete) through direct object reference.
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< 7.5.11>= 8.0.0, < 8.1.6= 34= 35CVSS 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
- Low
- Availability
- Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/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.
-
Identify installed Grafana versionRun 'grafana-server -v' or check /usr/share/grafana/version file, or query the Grafana API at /api/healthAffected if The version is less than 7.5.11, or greater than or equal to 8.0.0 but less than 8.1.6
-
Confirm snapshot feature is accessibleCheck if the snapshot feature is enabled in grafana.ini under [dashboards] default_home_dashboard_path or by attempting to access /api/snapshots without credentialsAffected if The snapshot API endpoints respond to requests, indicating the feature is active
-
Test unauthenticated snapshot accessSend a GET request to /api/snapshots or /dashboard/snapshot/ (use a known test key or enumerate using sequential numeric keys)Affected if The endpoint returns snapshot data without requiring authentication
-
Test snapshot deletion endpoint exposureSend a DELETE request to /api/snapshots-delete/:key where :key is any predictable value, without providing valid credentialsAffected if The delete operation succeeds or returns a valid response without authentication
You are affected if your Grafana version falls within the vulnerable range (before 7.5.11 or 8.0.0 to before 8.1.6) and the snapshot API endpoints are accessible without authentication.
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 · scoped7.5.118.1.6
Upgrade to Grafana 7.5.11+ or 8.1.6+ to receive the security patch, or implement reverse proxy rules to block the vulnerable paths /api/snapshots/:key, /api/snapshots-delete/:deleteKey, and /dashboard/snapshot/:key.
Grafana 7.5.11 (for 7.x branch) or Grafana 8.1.6 (for 8.x branch)
- Identify current Grafana version by running 'grafana-server -v' or checking the Grafana admin UI.
- If running Grafana 7.x (7.0.0 through 7.5.10), upgrade to version 7.5.11. If running Grafana 8.0.0 through 8.1.5, upgrade to version 8.1.6.
- Upgrade using the appropriate method for your installation: for package managers use 'sudo apt-get update && sudo apt-get upgrade grafana' (Debian/Ubuntu) or 'sudo yum update grafana' (RHEL/CentOS), or download and install the specific version from https://grafana.com/grafana/download/7.5.11 or https://grafana.com/grafana/download/8.1.6.
- Restart the Grafana service using 'sudo systemctl restart grafana-server' or the equivalent for your setup.
- Verify the upgrade was successful by checking the Grafana version again and confirming it shows 7.5.11 or 8.1.6.
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation8.0 h
- Testing6.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2021-39226 — 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-2021-39226 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