Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-2091

XPath expressions should not be vulnerable to injection attacks

    Details

    • Type: Vulnerability Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Refactor this code to not construct this XPath expression from tainted, user-controlled data.
    • Default Severity:
      Blocker
    • Impact:
      High
    • Likelihood:
      High
    • Default Quality Profiles:
      Sonar way
    • Targeted languages:
      C++, Objective-C, Python, VB.Net
    • Covered Languages:
      C#, Java, PHP
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      30min
    • Analysis Level:
      Abstract Interpretation
    • Analysis Scope:
      Main Sources
    • Common Rule:
      Yes
    • CERT:
      IDS53-J.
    • CWE:
      CWE-643
    • OWASP:
      A1

      Description

      User provided data, such as URL parameters, should always be considered untrusted and tainted. Constructing XPath expressions directly from tainted data enables attackers to inject specially crafted values that changes the initial meaning of the expression itself. Successful XPath injection attacks can read sensitive information from XML documents.

      See

        Attachments

          Issue Links

          1.
          C# RSPEC-4643 Language-Specification Active Unassigned
          2.
          Java RSPEC-5175 Language-Specification Active Unassigned
          3.
          PHP RSPEC-5399 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.campbell.2 Ann Campbell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: