Dangling Database Cursor ('Cursor Injection') |
Weakness ID: 619 (Weakness Base) | Status: Incomplete |
Description Summary
If a database cursor is not closed properly, then it could become accessible to other users while retaining the same privileges that were originally assigned, leaving the cursor "dangling."
Extended Description
For example, an improper dangling cursor could arise from unhandled exceptions. The impact of the issue depends on the cursor's role, but SQL injection attacks are commonly possible.
This issue is currently reported for unhandled exceptions, but it is theoretically possible any time the programmer does not close the cursor at the proper time. |
Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur. |
A cursor is a feature in Oracle PL/SQL and other languages that provides a handle for executing and accessing the results of SQL queries. |
Ordinality | Description |
---|---|
Primary | This could be primary when the programmer never attempts to close the cursor when finished with it. |
Resultant | (where the weakness is typically related to the presence of some other weaknesses) |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 402 | Transmission of Private Resources into a New Sphere ('Resource Leak') | Development Concepts699 Research Concepts1000 |
ChildOf | ![]() | 404 | Improper Resource Shutdown or Release | Development Concepts (primary)699 Research Concepts (primary)1000 |
PeerOf | ![]() | 265 | Privilege / Sandbox Issues | Research Concepts1000 |
PeerOf | ![]() | 388 | Error Handling | Research Concepts1000 |
David Litchfield. "The Oracle Hacker's Handbook". |
David Litchfield. "Cursor Injection". <http://www.databasesecurity.com/dbsec/cursor-injection.pdf>. |
Modifications | ||||
---|---|---|---|---|
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Other Notes | ||||
2008-10-14 | CWE Content Team | MITRE | Internal | |
updated Background Details, Description, Relationships | ||||
2009-05-27 | CWE Content Team | MITRE | Internal | |
updated Name | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Modes of Introduction, Other Notes, Weakness Ordinalities | ||||
Previous Entry Names | ||||
Change Date | Previous Entry Name | |||
2008-04-11 | Dangling Database Cursor (Cursor Injection) | |||
2009-05-27 | Dangling Database Cursor (aka 'Cursor Injection') | |||