Vulnerabilities in pkg:golang/github.com/blevesearch/bleve
PACKAGECVE-2022-31022 is a MODERATE (CVSS 5.5) missing role based access control vulnerability (CWE-306: Missing Authentication for Critical Function) affecting Github.com/blevesearch/bleve libraries in the Go ecosystem. The issue involves missing role based access control for the rest handlers in bleve/http package. Remediation is available by upgrading affected packages to version 2.5.0.
pkg:golang/github.com/blevesearch/bleve
Vulnerability advisories affecting package pkg:golang/github.com/blevesearch/bleve. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9w9f-6mg8-jp7w | CVE-2022-31022 | MODERATE | Missing Role Based Access Control for the REST handlers in bleve/http package |
CVE-2022-31022 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2022-31022
To remediate this vulnerability, upgrade all affected Github.com/blevesearch/bleve dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/blevesearch/bleve to Latest secure release
Upgrade github.com/blevesearch/bleve/v2 to 2.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/blevesearch/bleve
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-31022, inspect your project dependencies for Github.com/blevesearch/bleve:
inspect dependencies for github.com/blevesearch/bleve
Analyze the terminal output to locate any version of Github.com/blevesearch/bleve in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. In Github.com/blevesearch/bleve, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-31022 Affected Github.com/blevesearch/bleve Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/blevesearch/bleve
|
Go |
≤ 1.10.14
|
|
|
github.com/blevesearch/bleve/v2
|
Go |
< 2.5.0
|
2.5.0
|
References
Frequently Asked Questions
What is CVE-2022-31022?
Which Github.com/blevesearch/bleve versions are affected?
What version fixes CVE-2022-31022?
Is github.com/blevesearch/bleve affected?
Is github.com/blevesearch/bleve/v2 affected?
What is the CVSS score of CVE-2022-31022?
What CWE is associated with CVE-2022-31022?
How can I check Go dependencies for CVE-2022-31022?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9w9f-6mg8-jp7w",
"modified" : "2025-05-08T16:45:25Z",
"published" : "2022-06-03T22:17:51Z",
"aliases" : [ "CVE-2022-31022" ],
"summary" : "Missing Role Based Access Control for the REST handlers in bleve/http package",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nBleve includes HTTP utilities under bleve/http package, that are used by its sample application. \n(https://github.com/blevesearch/bleve-explorer)\nThese HTTP methods paves way for exploitation of a node’s filesystem where the bleve index resides, \nif the user has used bleve’s own HTTP (bleve/http) handlers for exposing the access to the indexes. \nFor instance, the CreateIndexHandler (http/index_create.go) and DeleteIndexHandler (http/index_delete.go) \nenable an attacker to create a bleve index (directory structure) anywhere where the user running the server \nhas the write permissions and to delete recursively any directory owned by the same user account.\n \nUsers who have used the bleve/http package for exposing access to bleve index without the explicit \nhandling for the Role Based Access Controls(RBAC) of the index assets would be impacted.\n\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n**No**. The http package is purely intended to be used for demonstration purposes. \nAnd bleve is never designed to be handling the RBACs or it was ever advertised to be used in that way. \nHence the collaborators of this project have decided to stay away from adding any authentication or \nauthorization to bleve project at the moment.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nThe bleve/http package is mainly for demonstration purposes and it lacks exhaustive validation of the user \ninputs as well as any authentication and authorization measures. \nSo it is recommended to not use that in production use cases.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue [here](https://github.com/blevesearch/bleve/issues).\n* Email us at [mailto:security@couchbase.com, fts-team@couchbase.com].",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/blevesearch/bleve"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.10.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/blevesearch/bleve/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/blevesearch/bleve/security/advisories/GHSA-9w9f-6mg8-jp7w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31022"
}, {
"type" : "WEB",
"url" : "https://github.com/blevesearch/bleve/commit/1c7509d6a17d36f265c90b4e8f4e3a3182fe79ff"
}, {
"type" : "WEB",
"url" : "https://github.com/blevesearch/bleve/commit/af9e3111dadfedf9d30f0448506b4a57fecc8550"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0470"
}, {
"type" : "PACKAGE",
"url" : "github.com/blevesearch/bleve"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-288", "CWE-306" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-03T22:17:51Z",
"nvd_published_at" : "2022-06-01T20:15:00Z"
}
}