Skip to content

fix(jdbc): stop executing the caller-supplied selectLimit query in getTables (CVE-2026-82583) - #200

Closed
benjodo wants to merge 1 commit into
Innovar-Healthcare:bridgelink_developmentfrom
benjodo:fix/cve-2026-82583-jdbc-selectlimit
Closed

benjodo wants to merge 1 commit into
Innovar-Healthcare:bridgelink_developmentfrom
benjodo:fix/cve-2026-82583-jdbc-selectlimit

Conversation

@benjodo

@benjodo benjodo commented Sep 13, 2026

Copy link
Copy Markdown

POST /connectors/jdbc/_getTables ran the selectLimit query parameter verbatim against every matched table, so any user with access to the Database connector could execute arbitrary SQL through the server (CWE-89).

The query is now resolved server-side from the configured driver list (ConfigurationController.getDatabaseDrivers(), matched by driver class name or alternative class name). A caller-supplied value is only honored when it is identical to that configured query; anything else is ignored with a warning. When the driver is unknown or has no select limit configured, getTables falls back to the existing DatabaseMetaData.getColumns() path. The parameter stays on the API so existing Administrator clients keep working; they already send the server-configured value.

Adds DatabaseConnectorServletTest (in-memory Derby, no external infra) proving that caller SQL never executes, including table redirection and file-write attempts, and that the configured and fallback paths still return metadata.

…tTables (CVE-2026-82583)

POST /connectors/jdbc/_getTables ran the selectLimit query parameter verbatim
against every matched table, so any user with access to the Database connector
could execute arbitrary SQL through the server (CWE-89).

The query is now resolved server-side from the configured driver list
(ConfigurationController.getDatabaseDrivers(), matched by driver class name or
alternative class name). A caller-supplied value is only honored when it is
identical to that configured query; anything else is ignored with a warning.
When the driver is unknown or has no select limit configured, getTables falls
back to the existing DatabaseMetaData.getColumns() path. The parameter stays on
the API so existing Administrator clients keep working; they already send the
server-configured value.

Adds DatabaseConnectorServletTest (in-memory Derby, no external infra) proving
that caller SQL never executes, including table redirection and file-write
attempts, and that the configured and fallback paths still return metadata.
@benjodo

benjodo commented Sep 16, 2026

Copy link
Copy Markdown
Author

Closing in favor of #203 / v26.6.1, which addresses this CVE with Innovar's own implementation (already published). Happy to help if anything from this PR is still useful. Note that bridgelink_development is still unpatched until #203 lands.

@benjodo benjodo closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant