Oracle database code security
PL/SQL static code analysis
Find SQL injection, privilege escalation through AUTHID and GRANT, command injection through scheduler jobs, hardcoded secrets and weak cryptography in Oracle PL/SQL procedures, functions and packages.
In short
DerScanner static application security testing (SAST) scans PL/SQL, the procedural language of Oracle Database. Its PL/SQL rules are published in the DerScanner vulnerability database, and most of them map to CWE, OWASP Top 10 and PCI DSS 4.0.
The rules cover SQL and code injection, privilege issues such as an unspecified AUTHID or GRANT ALL, command injection through DBMS_SCHEDULER jobs, cursors left open, hardcoded passwords and keys, weak cryptography, and web output such as cross-site scripting, open redirects and cookie settings.
DerScanner runs on-premise, in air-gapped networks or in the cloud. For PL/SQL it provides security analysis (SAST) in the same project and report as the application code that calls the database.
What the PL/SQL rules check
The PL/SQL rules look at what makes database code dangerous: whose rights a procedure runs with, which queries take outside input, and which secrets sit in the source. Each rule links to its description, CWE identifiers and fix recommendation.
Injection
SQL injection, external C or Java code from untrusted sources, DBMS_SCHEDULER jobs built from outside input, and web output that allows cross-site scripting or open redirects.
- lowSQL injection
- mediumCode injection
- mediumCommand injection (job)
- mediumResource injection
- mediumCross-site scripting (XSS)
- mediumOpen redirect
- mediumTrust boundary violation
- mediumDangerous function
Privileges and database configuration
Procedures without AUTHID, objects without a schema, GRANT ALL and GRANT EXECUTE, default accounts and SID values, file system access, and cursors another user can capture.
- mediumAUTHID unspecified
- lowSchema unspecified
- mediumInsecure GRANT usage: all permissions
- mediumInsecure GRANT usage: execute permission
- mediumDefault account
- mediumDefault SID value
- lowFile system access
- mediumCursor snarfing
- mediumGlobal cursor
Secrets and cryptography
Passwords, keys and initialization vectors in the code, weak hashing, encryption and random numbers, and wrapping used as protection.
- mediumHardcoded password
- mediumNull password
- mediumEmpty password
- lowUnsafe password management
- mediumHardcoded encryption key
- mediumNull encryption key
- criticalEmpty encryption key
- mediumHardcoded initialization vector
- criticalWeak hashing algorithm
- criticalWeak encryption algorithm
- criticalWeak random number generator
- mediumWeak seed of random number generator
- mediumWeak obfuscation (wrapping)
Web sessions
PL/SQL that serves web pages: plain HTTP and cookie settings.
- mediumHTTP usage
- mediumCookie: transmission not over SSL
- mediumCookie: not HttpOnly
- mediumCookie: long expiration time
- mediumCookie: broad path
- mediumCookie: broad domain
Reliability and hidden code
Resource leaks, denial of service, empty exception handlers, NULL comparisons, error details and dead code.
Where PL/SQL code runs
PL/SQL runs inside Oracle Database as procedures, functions and packages. Business rules often live there, next to the data, so a flaw in a package reaches the data directly.
Privileges decide the impact. A procedure defined by a powerful user and called without AUTHID CURRENT_USER runs with the definer rights, which is why the rule list starts with privileges as much as with injection.
Wrapped code is not protected code
Wrapping is the built-in obfuscation for PL/SQL. The rule Weak obfuscation (wrapping) flags it because the algorithm can be reversed with publicly available tools.
DerScanner reads PL/SQL source as it is, from a repository or an archive, and puts it in the same project as the Java, C# or Python services that call the database.
Questions buyers ask about PL/SQL static code analysis
DerScanner SAST scans PL/SQL with rules from its vulnerability database, SQL injection among them. Other rules cover code injection, command injection through DBMS_SCHEDULER jobs, resource injection, cross-site scripting and open redirects in PL/SQL web output.
AUTHID decides whose privileges a function, procedure or package runs with: DEFINER, the user who defined it, or CURRENT_USER. If the definer has broader rights than the caller, calling the code can escalate privileges. The rule AUTHID unspecified marks code that does not set it.
No. Wrapping is the built-in obfuscation for PL/SQL, and its algorithm can be reversed with publicly available tools. The rule Weak obfuscation (wrapping) flags code that relies on it.
Yes. Both are among the 43 supported languages. Each has its own rules in the vulnerability database, and findings from both land in the same project and report.
Most PL/SQL rules list CWE identifiers and map to OWASP Top 10, OWASP ASVS and PCI DSS 4.0; many also map to HIPAA. The mapping is shown on each rule page in the vulnerability database.
Yes. DerScanner installs on-premise, including fully air-gapped networks, or runs in the cloud. Source code, scan results and reports stay on internal servers in an on-premise installation.
Yes. Request a free pilot on this page: the team gives you access and helps with the first scan. The pilot works in the cloud and on-premise.
Static analysis for other enterprise languages
Try DerScanner on your own code, free
Scan your own PL/SQL code and see what DerScanner finds in it.
Request a free pilot. We give you access and help with the first scan. It works in the cloud and on-premise.
Want to describe your project first? Take the 2-minute PoC survey
Make Your Applications
Secure Today
Sign up for a personalized demo to see
how DerScanner can meet your Application Security needs

