[BUG] Oracle DSN TRACE options may create arbitrary files on the system
## Description
The `go-ora` library used in the nuclei Oracle JS module accepts `TRACE FILE` and `TRACE DIR` style DSN (Data Source Name) options. When a database connection is opened using such a DSN, the library may create trace files at the paths specified in those options — including arbitrary locations on the filesystem.
This allows unintended or malicious file creation outside of allowed directories simply by crafting a DSN with trace path options, unless the `-allow-local-file-access` (`-lfa`) flag is explicitly enabled.
## Affected Component
- `pkg/js/libs/oracle/oracle.go` — `OracleClient.ConnectWithDSN`
## Expected Behavior
Oracle DSN trace path options should be normalized and rejected (with an appropriate error) if they point to paths outside the allowed templates directory, unless `-allow-local-file-access` is explicitly enabled.
## Actual Behavior
No validation is performed on trace path DSN options before passing the DSN to `go-ora`, allowing arbitrary file creation on the host system.
## Fix
Normalize DSN trace paths via `protocolstate.NormalizePathWithExecutionId` and reject any path falling outside the allowed location unless `-lfa` is enabled.
## References
- Fix in progress: https://github.com/projectdiscovery/nuclei/pull/7480
- Reported by: @dwisiswant0
0 条评论