CWE-619 · Słabość
Dangling Database Cursor ('Cursor Injection')
- Abstrakcja
- Bazowa
- Status
- Niekompletny
- Dodano
- 7 maja 2007
- Ostatnia zmiana
- 3 kwietnia 2025
Opis
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.
Skutki
Confidentiality, Integrity
Read Application Data; Modify Application Data
Zapobieganie
Implementation
Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur.
Słabość nadrzędna
Kiedy powstaje
- Implementation — 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.
Dotyczy
SQL, Database Server
Źródła
- The Oracle Hacker's Handbook — David Litchfield
- Cursor Injection — David Litchfield
Wpis z katalogu CWE 4.20.