CVE-2022-31022
Missing Role Based Access Control for the REST handlers in bleve/http package
Also known as GHSA-9w9f-6mg8-jp7w, GO-2022-0470
Mitigation
- Upgrade github.com/blevesearch/bleve/v2 to 2.5.0 or later.
Who should check
- Projects that depend on Go package github.com/blevesearch/bleve (<= 1.10.14)
- Projects that depend on Go package github.com/blevesearch/bleve/v2 (< 2.5.0)
- Anyone running blevesearch bleve >= 0.1.0, < 2.5.0
Vulnerability facts
- Affected
- github.com/blevesearch/bleve <= 1.10.14; github.com/blevesearch/bleve/v2 < 2.5.0
- Fixed in
- 2.5.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 6.2 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.37% chance of exploitation in 30 days (percentile 23, 2026-11-26)
- CWE
- CWE-288, CWE-306
- Modified
Description
Bleve is a text indexing library for go. Bleve includes HTTP utilities under bleve/http package, that are used by its sample application. These HTTP methods pave way for exploitation of a node’s filesystem where the bleve index resides, if the user has used bleve’s own HTTP (bleve/http) handlers for exposing the access to the indexes. For instance, the CreateIndexHandler (`http/index_create.go`) and DeleteIndexHandler (`http/index_delete.go`) enable an attacker to create a bleve index (directory structure) anywhere where the user running the server has the write permissions and to delete recursively any directory owned by the same user account. Users who have used the bleve/http package for exposing access to bleve index without the explicit handling for the Role Based Access Controls(RBAC) of the index assets would be impacted by this issue. Version 2.5.0 relocated the `http/` dir used _only_ by bleve-explorer to `blevesearch/bleve-explorer`, thereby addressing the issue. However, the http package is purely intended to be used for demonstration purposes. Bleve was never designed handle the RBACs, nor it was ever advertised to be used in that way. The collaborators of this project have decided to stay away from adding any authentication or authorization to bleve project at the moment. The bleve/http package is mainly for demonstration purposes and it lacks exhaustive validation of the user inputs as well as any authentication and authorization measures. It is recommended to not use bleve/http in production use cases.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/blevesearch/bleve | <= 1.10.14 | — | osv |
| Go github.com/blevesearch/bleve/v2 | < 2.5.0 | 2.5.0 | osv |
| blevesearch bleve | >= 0.1.0, < 2.5.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-31022. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-31022.md Affected: github.com/blevesearch/bleve <= 1.10.14; github.com/blevesearch/bleve/v2 < 2.5.0 Fixed in: 2.5.0 Steps: 1. Search this machine and project for github.com/blevesearch/bleve (Go), github.com/blevesearch/bleve/v2 (Go), blevesearch bleve: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2022-31022 being exploited?
There is no confirmed exploitation: CVE-2022-31022 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.37% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-31022?
Medium: CVSS 6.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2022-31022?
github.com/blevesearch/bleve <= 1.10.14; github.com/blevesearch/bleve/v2 < 2.5.0.
Is there a fix for CVE-2022-31022?
Yes. Fixed in 2.5.0. Upgrade github.com/blevesearch/bleve/v2 to 2.5.0 or later.
How do I check if I'm affected by CVE-2022-31022?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.