ghsa-9w9f-6mg8-jp7w
Vulnerability from github
Impact
What kind of vulnerability is it? Who is impacted?
Bleve includes HTTP utilities under bleve/http package, that are used by its sample application. (https://github.com/blevesearch/bleve-explorer) These HTTP methods paves 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.
Patches
Has the problem been patched? What versions should users upgrade to?
No. The http package is purely intended to be used for demonstration purposes. And bleve is never designed to be handling the RBACs or it was ever advertised to be used in that way. Hence the collaborators of this project have decided to stay away from adding any authentication or authorization to bleve project at the moment.
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
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. So it is recommended to not use that in production use cases.
For more information
If you have any questions or comments about this advisory: * Open an issue here. * Email us at [mailto:security@couchbase.com, fts-team@couchbase.com].
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/blevesearch/bleve" }, "ranges": [ { "events": [ { "introduced": "0" }, { "last_affected": "1.10.14" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/blevesearch/bleve/v2" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.5.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-31022" ], "database_specific": { "cwe_ids": [ "CWE-288", "CWE-306" ], "github_reviewed": true, "github_reviewed_at": "2022-06-03T22:17:51Z", "nvd_published_at": "2022-06-01T20:15:00Z", "severity": "MODERATE" }, "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\u2019s filesystem where the bleve index resides, \nif the user has used bleve\u2019s 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].", "id": "GHSA-9w9f-6mg8-jp7w", "modified": "2025-05-08T16:45:25Z", "published": "2022-06-03T22:17:51Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N", "type": "CVSS_V3" } ], "summary": "Missing Role Based Access Control for the REST handlers in bleve/http package" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.