Skip to content

fix: add JDBC URL security validation to prevent file read and RCE#14

Open
MarkLee131 wants to merge 1 commit intodromara:masterfrom
MarkLee131:fix/jdbc-url-validation
Open

fix: add JDBC URL security validation to prevent file read and RCE#14
MarkLee131 wants to merge 1 commit intodromara:masterfrom
MarkLee131:fix/jdbc-url-validation

Conversation

@MarkLee131
Copy link
Copy Markdown

Fixes #13

Add JdbcSecurityUtil with a 20-parameter blacklist covering MySQL, PostgreSQL, and H2 JDBC drivers. Uses toLowerCase() + contains() matching on the full URL to cover all parameter separator formats (?, ;, (), address=).

  • New: JdbcSecurityUtil.validate() utility class
  • DbConfigController: validate URL in add/edit/testConnection
  • DbconfigServiceImpl: defense-in-depth before getConnection()
  • RunUtil: defense-in-depth before all 4 getConnection() calls

Fixes dromara#13

Add JdbcSecurityUtil with a 20-parameter blacklist covering MySQL,
PostgreSQL, and H2 JDBC drivers. Uses toLowerCase() + contains()
matching on the full URL to cover all parameter separator formats
(?, ;, (), address=).

- New: JdbcSecurityUtil.validate() utility class
- DbConfigController: validate URL in add/edit/testConnection
- DbconfigServiceImpl: defense-in-depth before getConnection()
- RunUtil: defense-in-depth before all 4 getConnection() calls
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.

Vulnerability: Arbitrary File Read and Deserialization in dataCompare ≤ 1.0.1

1 participant