{"id":"GHSA-9w9f-6mg8-jp7w","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].","aliases":["CVE-2022-31022","GO-2022-0470"],"modified":"2026-02-04T03:00:12.196839Z","published":"2022-06-03T22:17:51Z","related":["CGA-px5x-hqw4-wqvr"],"database_specific":{"nvd_published_at":"2022-06-01T20:15:00Z","severity":"MODERATE","cwe_ids":["CWE-288","CWE-306"],"github_reviewed_at":"2022-06-03T22:17:51Z","github_reviewed":true},"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"}],"affected":[{"package":{"name":"github.com/blevesearch/bleve","ecosystem":"Go","purl":"pkg:golang/github.com/blevesearch/bleve"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.10.14"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-9w9f-6mg8-jp7w/GHSA-9w9f-6mg8-jp7w.json"}},{"package":{"name":"github.com/blevesearch/bleve/v2","ecosystem":"Go","purl":"pkg:golang/github.com/blevesearch/bleve/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.5.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-9w9f-6mg8-jp7w/GHSA-9w9f-6mg8-jp7w.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"}]}