Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-619:Dangling Database Cursor ('Cursor Injection')
Weakness ID:619
Version:v4.17
Weakness Name:Dangling Database Cursor ('Cursor Injection')
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Incomplete
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼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."

▼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.

▼Alternate Terms
▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfAllowed-with-ReviewC402Transmission of Private Resources into a New Sphere ('Resource Leak')
ParentOfAllowed-with-ReviewC404Improper Resource Shutdown or Release
Nature: ChildOf
Mapping: Allowed-with-Review
Type: Class
ID: 402
Name: Transmission of Private Resources into a New Sphere ('Resource Leak')
Nature: ParentOf
Mapping: Allowed-with-Review
Type: Class
ID: 404
Name: Improper Resource Shutdown or Release
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedC399Resource Management Errors
MemberOfProhibitedC990SFP Secondary Cluster: Tainted Input to Command
MemberOfProhibitedC1403Comprehensive Categorization: Exposed Resource
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 399
Name: Resource Management Errors
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 990
Name: SFP Secondary Cluster: Tainted Input to Command
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1403
Name: Comprehensive Categorization: Exposed Resource
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-240Weaknesses in Software Written in SQL
MemberOfProhibitedBSBOSS-272Weaknesses in Database Server
MemberOfProhibitedBSBOSS-318Modify Application Data (impact)
MemberOfProhibitedBSBOSS-328Read Application Data (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-240
Name: Weaknesses in Software Written in SQL
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-272
Name: Weaknesses in Database Server
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-318
Name: Modify Application Data (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-328
Name: Read Application Data (impact)
▼Relevant To View
Relevant to the view"Software Development - (699)"
NatureMappingTypeIDName
MemberOfProhibitedC399Resource Management Errors
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 399
Name: Resource Management Errors
Relevant to the view"Software Fault Pattern (SFP) Clusters - (888)"
NatureMappingTypeIDName
MemberOfProhibitedC990SFP Secondary Cluster: Tainted Input to Command
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 990
Name: SFP Secondary Cluster: Tainted Input to Command
▼Background Detail

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.

▼Common Consequences
ScopeLikelihoodImpactNote
ConfidentialityIntegrityN/ARead Application DataModify Application Data
N/A
Scope: Confidentiality, Integrity
Likelihood: N/A
Impact: Read Application Data, Modify Application Data
Note:
N/A
▼Potential Mitigations
Phase:Implementation
Mitigation ID:
Strategy:
Effectiveness:
Description:

Close cursors immediately after access to them is complete. Ensure that you close cursors if exceptions occur.

Note:

▼Modes Of Introduction
Phase: Implementation
Note:

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.

▼Applicable Platforms
Languages
Class: SQL(Undetermined Prevalence)
Technology
Class: Database Server(Undetermined Prevalence)
▼Demonstrative Examples
▼Observed Examples
ReferenceDescription
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      Primary
      This could be primary when the programmer never attempts to close the cursor when finished with it.
      Resultant
      N/A
      Ordinality: Primary
      Description:
      This could be primary when the programmer never attempts to close the cursor when finished with it.
      Ordinality: Resultant
      Description:
      N/A
      ▼Detection Methods
      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      Software Fault PatternsSFP24N/ATainted input to command
      Taxonomy Name: Software Fault Patterns
      Entry ID: SFP24
      Fit: N/A
      Entry Name: Tainted input to command
      ▼Related Attack Patterns
      IDName
      ▼References
      Reference ID: REF-505
      Title: The Oracle Hacker's Handbook
      Author: David Litchfield
      Section:
      Publication:
      Publisher:
      Edition:
      URL:
      URL Date:
      Day:N/A
      Month:N/A
      Year:N/A
      Reference ID: REF-506
      Title: Cursor Injection
      Author: David Litchfield
      Section:
      Publication:
      Publisher:
      Edition:
      URL:http://www.davidlitchfield.com/cursor-injection.pdf
      URL Date:2023-04-07
      Day:N/A
      Month:N/A
      Year:N/A
      Details not found