GHSA-vwjc-v7x7-cm6g

Suggest an improvement
Source
https://github.com/advisories/GHSA-vwjc-v7x7-cm6g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-vwjc-v7x7-cm6g/GHSA-vwjc-v7x7-cm6g.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vwjc-v7x7-cm6g
Aliases
Published
2026-07-16T20:17:42Z
Modified
2026-08-02T03:56:44Z
Severity
  • 8.7 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
ArcadeDB: Scripting authorization gate (GHSA-48qw-824m-86pr) bypassed via SQL DEFINE FUNCTION ... LANGUAGE js
Details

The GHSA-48qw-824m-86pr hardening added a checkPermissionsOnDatabase(UPDATE_SECURITY) gate on the polyglot engine (PolyglotQueryEngine.java:112-114,126,176,199), but only there. The SQL route to JavaScript never touches it: DefineFunctionStatement.executeSimple (DefineFunctionStatement.java:37-100), LocalSchema.registerFunctionLibrary, and SQLQueryEngine library-function invocation (SQLQueryEngine.java:198-224) do no scripting-permission check.

Exploit: any user authorized for the DB (including a read-only role) runs POST /api/v1/command/ {"language":"sql","command":"DEFINE FUNCTION x.run "" LANGUAGE js"} then SELECT x.run(), executing arbitrary JavaScript and defeating the control meant to restrict scripting to security admins. On this path allowedPackages is empty so Java.type host lookup and reflection are blocked, but IOAccess.ALL still permits load(url) SSRF/remote-JS inclusion and unbounded CPU/memory DoS.

Fix: gate DefineFunctionStatement.executeSimple, the SQLQueryEngine library-function wrapper (to also cover pre-existing libraries), and DeleteFunctionStatement with UPDATE_SECURITY for js/polyglot languages. Centralize as one assertCanExecuteUserCode(database) invoked by every code-execution surface. Also set IOAccess.NONE / PolyglotAccess.NONE on the Context (GraalPolyglotEngine.java:86,91).

Database specific
{
    "cwe_ids":  [
        "CWE-74"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-16T20:17:42Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Maven / com.arcadedb:arcadedb-engine

Package

Name
com.arcadedb:arcadedb-engine
View open source insights on deps.dev
Purl
pkg:maven/com.arcadedb/arcadedb-engine

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
26.7.2

Affected versions

21.*
21.9.1-beta
21.9.1
21.10.1
21.10.2
21.11.1
21.12.1
22.*
22.1.1
22.1.2
22.1.3
22.2.1
22.8.1
22.9.1
22.10.1
22.11.1
22.12.1
23.*
23.1.1
23.1.2
23.2.1
23.3.1
23.4.1
23.5.1
23.6.1
23.7.1
23.9.1
23.10.1
23.11.1
23.12.1
23.12.2
24.*
24.1.1
24.2.1
24.4.1
24.5.1
24.6.1
24.10.1
24.11.1
24.11.2
25.*
25.1.1
25.2.1
25.3.1
25.3.2
25.4.1
25.5.1
25.6.1
25.7.1
25.8.1
25.9.1
25.10.1
25.11.1
25.12.1
26.*
26.1.1
26.2.1
26.2.2
26.3.1
26.3.2
26.4.2
26.5.1
26.6.1
26.7.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-vwjc-v7x7-cm6g/GHSA-vwjc-v7x7-cm6g.json"