GHSA-6r8p-hpg7-825g: Uncontrolled Recursion in SurrealQL Parsing
In some specific instances, the SurrealQL parser will attempt to recursively parse nested statements or idioms (i.e. nested IF
and RELATE
statements, nested basic idioms and nested access to attributes) without checking if the depth limit established by default or in the SURREAL_MAX_COMPUTATION_DEPTH
environment variable is exceeded. This can lead to the stack overflowing when the nesting surpasses certain levels of depth.
References
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=62410
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=62652
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=63797
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=64445
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=64731
- bugs.chromium.org/p/oss-fuzz/issues/detail?id=65277
- github.com/advisories/GHSA-6r8p-hpg7-825g
- github.com/surrealdb/surrealdb
- github.com/surrealdb/surrealdb/commit/f838da248e3854e4250e5187a3a67507cb7efaaa
- github.com/surrealdb/surrealdb/pull/3232
- github.com/surrealdb/surrealdb/security/advisories/GHSA-6r8p-hpg7-825g
Detect and mitigate GHSA-6r8p-hpg7-825g with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →