CVE-2022-31022
Missing Role Based Access Control for the REST handlers in bleve/http package
Record from NVD · Published June 1, 2022
github.com/blevesearch/bleve/v2/http is fixed in v2.3.6 (Go Modules)
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.
EPSS 0.34% · 28.2th percentile
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/blevesearch/bleve/v2/http | Go Modules | v2.3.6 |
| github.com/blevesearch/bleve/http | Go Modules | 1.10.14 |
| github.com/blevesearch/bleve/v2 | Go Modules | 2.5.0 |
| github.com/blevesearch/bleve | Go Modules | 1.10.14 |
| mattermost-10.2 | Chainguard | 10.2.3-r6 |
| mattermost-fips-10.8 | Chainguard | 10.8.1-r2 |
| gitea | Chainguard | 1.23.7-r2 |
| mattermost-10.1 | Wolfi | 10.1.7-r8 |
| mattermost-10.4 | Wolfi | 10.4.5-r2 |
| mattermost-10.5 | Chainguard | 10.5.5-r1 |
| mattermost-fips-10.5 | Chainguard | 10.5.5-r1 |
| grafana-11.6 | Chainguard | 11.6.7-r0 |
3 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| couchbase | bleve | 0.1.0 |
Timeline
- Jun 1, 2022 CVE Published
- Jun 2, 2022 EPSS Score (30 in total, the first dated here)
- Feb 9, 2023 CVE Updated
- Mar 17, 2026 Security Advisory
- Jun 25, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-31022
vulnetix vdb fixes CVE-2022-31022
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-31022/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart