Code check for oracle/sql-scripts/citydb-pkg/delete.sql: Medium-risk issue #3: Schema name is validated but not authorized
Open
@yaozhihang is already working on this.
Since Aug 20, 2026.
domain: oracle
type: risk
- Dominant language
- PLpgSQL
- Stars
- 482
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
Schema validation does not provide schema authorization
Description
The cross-schema dispatcher at delete.sql (line 122) validates only that the supplied text is a syntactically valid identifier. If the package owner has EXECUTE on another schema’s citydb_delete, every caller of this definer-rights package inherits that cross-schema capability.
Suggested approach
Use an invoker-rights router or explicitly authorize SYS_CONTEXT('USERENV','SESSION_USER') for the requested schema. DBMS_ASSERT prevents injection; it does not perform authorization.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.