| Title | https://github.com/h2oai/ h2o-3 gha-master-7661 Missing Authorization |
|---|
| Description | ## Title: Rapids run_tool primitive is unrestrictedly exposed and reaches EncryptionTool for arbitrary file read
## Description
The Rapids run_tool primitive (water.rapids.ast.prims.internal.AstRunTool) is registered in Env.java with the comment "For internal use only," but it is registered exactly like every other publicly-callable Rapids function, with no authorization check, feature flag, or role restriction distinguishing it. Any client able to submit a Rapids expression can invoke it.
run_tool accepts a class name restricted to the water.tools. package prefix and an array of string parameters, then invokes that class's static mainInternal(String[]) method via reflection. water.tools.EncryptionTool takes both an input file path and an output file path directly from those parameters with no validation against any base directory or H2O-managed scope, then reads the input file and writes its encrypted content to the output file using a key supplied by the same caller.
I reproduced the exact reflection call AstRunTool.apply() performs (Class.forName("water.tools." + toolClassName), getDeclaredMethod("mainInternal", String[].class), invoke(null, args)) against the unmodified EncryptionTool class. Using a keystore and key generated with an ordinary, unprivileged keytool -genseckey command, I read an arbitrary file's content through the input path parameter, wrote it in encrypted form to an arbitrary output path, and decrypted it offline with the same key, recovering the exact original content.
## PoC:
Generate an attacker-owned keystore:
```keytool -genseckey -alias attackerkey -keyalg AES -keysize 256 -keystore attacker.jks -storetype JCEKS -storepass attackerpass -keypass attackerpass```
Submit the Rapids expression:
```(run_tool "EncryptionTool" ["attacker.jks" "JCEKS" "attackerkey" "attackerpass" "AES" "/path/to/target/file" "/tmp/exfiltrated_output.enc"])```
Decrypt the result offline with the same key and password to recover the target file's content.
Since H2O defaults to LoginType.NONE (no authentication) unless an operator explicitly configures one of the login mechanisms at startup, this is unauthenticated remote arbitrary file read against a default deployment. Even with authentication configured, any authenticated user reaches this, since the "for internal use only" restriction described in the code comment is not enforced. water.tools.MojoConvertTool has the same shape (arbitrary input and output paths with no restriction) and looks like a parallel arbitrary file write primitive reachable the same way.
|
|---|
| Source | ⚠️ https://github.com/geo-chen/oss/blob/main/h2o-3.md |
|---|
| User | geochen (UID 78995) |
|---|
| Submission | 10/17/2026 15:31 (1 month ago) |
|---|
| Moderation | 11/08/2026 21:47 (22 days later) |
|---|
| Status | Duplicate |
|---|
| VulDB entry | 300372 [h2oai h2o-3 up to 3.46.0 routine] |
|---|
| Points | 0 |
|---|