Description
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."
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.
Potential Impact
Confidentiality, Integrity
Read Application Data, Modify Application Data
Mitigations & Prevention
Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur.
Related Weaknesses
Taxonomy Mappings
- Software Fault Patterns: SFP24 — Tainted input to command
Frequently Asked Questions
What is CWE-619?
CWE-619 (Dangling Database Cursor ('Cursor Injection')) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. 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."
How can CWE-619 be exploited?
Attackers can exploit CWE-619 (Dangling Database Cursor ('Cursor Injection')) to read application data, modify application data. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-619?
Key mitigations include: Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur.
What is the severity of CWE-619?
CWE-619 is classified as a Base-level weakness (Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.