GHSA-h376-j262-vhq6

Suggest an improvement
Source
https://github.com/advisories/GHSA-h376-j262-vhq6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-h376-j262-vhq6/GHSA-h376-j262-vhq6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-h376-j262-vhq6
Aliases
Published
2022-01-06T23:55:09Z
Modified
2024-02-17T05:22:34.773250Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
RCE in H2 Console
Details

Impact

H2 Console in versions since 1.1.100 (2008-10-14) to 2.0.204 (2021-12-21) inclusive allows loading of custom classes from remote servers through JNDI.

H2 Console doesn't accept remote connections by default. If remote access was enabled explicitly and some protection method (such as security constraint) wasn't set, an intruder can load own custom class and execute its code in a process with H2 Console (H2 Server process or a web server with H2 Console servlet).

It is also possible to load them by creation a linked table in these versions, but it requires ADMIN privileges and user with ADMIN privileges has full access to the Java process by design. These privileges should never be granted to untrusted users.

Patches

Since version 2.0.206 H2 Console and linked tables explicitly forbid attempts to specify LDAP URLs for JNDI. Only local data sources can be used.

Workarounds

H2 Console should never be available to untrusted users.

-webAllowOthers is a dangerous setting that should be avoided.

H2 Console Servlet deployed on a web server can be protected with a security constraint: https://h2database.com/html/tutorial.html#usingH2ConsoleServlet If webAllowOthers is specified, you need to uncomment and edit <security-role> and <security-constraint> as necessary. See documentation of your web server for more details.

References

This issue was found and privately reported to H2 team by JFrog Security's vulnerability research team with detailed information.

References

Affected packages

Maven / com.h2database:h2

Package

Name
com.h2database:h2
View open source insights on deps.dev
Purl
pkg:maven/com.h2database/h2

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.1.100
Fixed
2.0.206

Affected versions

1.*

1.1.100
1.1.101
1.1.102
1.1.103
1.1.104
1.1.105
1.1.106
1.1.107
1.1.108
1.1.109
1.1.110
1.1.111
1.1.112
1.1.113
1.1.114
1.1.115
1.1.116
1.1.117
1.1.118
1.1.119
1.2.120
1.2.121
1.2.122
1.2.123
1.2.124
1.2.125
1.2.126
1.2.127
1.2.128
1.2.129
1.2.130
1.2.131
1.2.132
1.2.133
1.2.134
1.2.135
1.2.136
1.2.137
1.2.138
1.2.139
1.2.140
1.2.141
1.2.142
1.2.143
1.2.144
1.2.145
1.2.147
1.3.146
1.3.148
1.3.149
1.3.150
1.3.151
1.3.152
1.3.153
1.3.154
1.3.155
1.3.156
1.3.157
1.3.158
1.3.159
1.3.160
1.3.161
1.3.162
1.3.163
1.3.164
1.3.165
1.3.166
1.3.167
1.3.168
1.3.169
1.3.170
1.3.171
1.3.172
1.3.173
1.3.174
1.3.175
1.3.176
1.4.177
1.4.178
1.4.179
1.4.180
1.4.181
1.4.182
1.4.183
1.4.184
1.4.185
1.4.186
1.4.187
1.4.188
1.4.189
1.4.190
1.4.191
1.4.192
1.4.193
1.4.194
1.4.195
1.4.196
1.4.197
1.4.198
1.4.199
1.4.200

2.*

2.0.202
2.0.204