SonarSource Rules
  • Products

    In-IDE

    Code Quality and Security in your IDE with SonarQube Ide

    IDE extension that lets you fix coding issues before they exist!

    Discover SonarQube for IDE

    SaaS

    Code Quality and Security in the cloud with SonarQube Cloud

    Setup is effortless and analysis is automatic for most languages

    Discover SonarQube Cloud

    Self-Hosted

    Code Quality and Security Self-Hosted with SonarQube Server

    Fast, accurate analysis; enterprise scalability

    Discover SonarQube Server
  • SecretsSecrets
  • ABAPABAP
  • AnsibleAnsible
  • ApexApex
  • AzureResourceManagerAzureResourceManager
  • CC
  • C#C#
  • C++C++
  • CloudFormationCloudFormation
  • COBOLCOBOL
  • CSSCSS
  • DartDart
  • DockerDocker
  • FlexFlex
  • GitHub ActionsGitHub Actions
  • GoGo
  • HTMLHTML
  • JavaJava
  • JavaScriptJavaScript
  • JSONJSON
  • JCLJCL
  • KotlinKotlin
  • KubernetesKubernetes
  • Objective CObjective C
  • PHPPHP
  • PL/IPL/I
  • PL/SQLPL/SQL
  • PythonPython
  • RPGRPG
  • RubyRuby
  • RustRust
  • ScalaScala
  • SwiftSwift
  • TerraformTerraform
  • TextText
  • TypeScriptTypeScript
  • T-SQLT-SQL
  • VB.NETVB.NET
  • VB6VB6
  • XMLXML
  • YAMLYAML
C#

C# static code analysis

Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your C# code

  • All rules 494
  • Vulnerability47
  • Bug88
  • Security Hotspot24
  • Code Smell335

  • Quick Fix 61
 
Tags
    Impact
      Clean code attribute
        1. XSLT Transformations should not be vulnerable to injection attacks

           Vulnerability
        2. Server-side requests should not be vulnerable to traversing attacks

           Vulnerability
        3. Content Security Policies should be restrictive

           Vulnerability
        4. JWT secret keys should not be disclosed

           Vulnerability
        5. Stack traces should not be disclosed

           Vulnerability
        6. Loop boundaries should not be vulnerable to injection attacks

           Vulnerability
        7. Connection strings should not be vulnerable to injections attacks

           Vulnerability
        8. Memory allocations should not be vulnerable to Denial of Service attacks

           Vulnerability
        9. Accessing files should not lead to filesystem oracle attacks

           Vulnerability
        10. Environment variables should not be defined from untrusted input

           Vulnerability
        11. XML operations should not be vulnerable to injection attacks

           Vulnerability
        12. XML signatures should be validated securely

           Vulnerability
        13. Applications should not create session cookies from untrusted input

           Vulnerability
        14. Reflection should not be vulnerable to injection attacks

           Vulnerability
        15. Extracting archives should not lead to zip slip vulnerabilities

           Vulnerability
        16. OS commands should not be vulnerable to argument injection attacks

           Vulnerability
        17. Types allowed to be deserialized should be restricted

           Vulnerability
        18. JWT should be signed and verified with strong cipher algorithms

           Vulnerability
        19. Cipher algorithms should be robust

           Vulnerability
        20. Encryption algorithms should be used with secure mode and padding scheme

           Vulnerability
        21. Insecure temporary file creation methods should not be used

           Vulnerability
        22. Passwords should not be stored in plaintext or with a fast hashing algorithm

           Vulnerability
        23. Dynamic code execution should not be vulnerable to injection attacks

           Vulnerability
        24. NoSQL operations should not be vulnerable to injection attacks

           Vulnerability
        25. HTTP request redirections should not be open to forging attacks

           Vulnerability
        26. Logging should not be vulnerable to injection attacks

           Vulnerability
        27. Server-side requests should not be vulnerable to forging attacks

           Vulnerability
        28. Deserialization should not be vulnerable to injection attacks

           Vulnerability
        29. Endpoints should not be vulnerable to reflected cross-site scripting (XSS) attacks

           Vulnerability
        30. Server certificates should be verified during SSL/TLS connections

           Vulnerability
        31. LDAP connections should be authenticated

           Vulnerability
        32. Cryptographic keys should be robust

           Vulnerability
        33. Weak SSL/TLS protocols should not be used

           Vulnerability
        34. Secure random number generators should not output predictable values

           Vulnerability
        35. Serialization constructors should be secured

           Vulnerability
        36. Members should not have conflicting transparency annotations

           Vulnerability
        37. "CoSetProxyBlanket" and "CoInitializeSecurity" should not be used

           Vulnerability
        38. Database queries should not be vulnerable to injection attacks

           Vulnerability
        39. Cipher Block Chaining IVs should be unpredictable

           Vulnerability
        40. XML parsers should not be vulnerable to XXE attacks

           Vulnerability
        41. Regular expressions should not be vulnerable to Denial of Service attacks

           Vulnerability
        42. A secure password should be used when connecting to a database

           Vulnerability
        43. XPath expressions should not be vulnerable to injection attacks

           Vulnerability
        44. I/O function calls should not be vulnerable to path injection attacks

           Vulnerability
        45. LDAP queries should not be vulnerable to injection attacks

           Vulnerability
        46. OS commands should not be vulnerable to command injection attacks

           Vulnerability
        47. Password hashing functions should use an unpredictable salt

           Vulnerability

        XSLT Transformations should not be vulnerable to injection attacks

        intentionality - complete
        security
        Vulnerability
        • injection

        Why is this an issue?

        How can I fix it?

        More Info

        XSLT Injection is a security vulnerability that occurs when an application uses untrusted user input to construct an XSLT (Extensible Stylesheet Language Transformations) stylesheet. XSLT engines are powerful templating tools designed to transform XML documents

        What is the potential impact?

        An attacker can provide malicious XSLT code that the application’s XML processor will then execute, such as references to other files, embedded scripts, or special objects.

        Below are some real-world scenarios that illustrate some impacts of an attacker exploiting the vulnerability.

        Reading Sensitive Files

        The most common impact of XSLT Injection is the ability to read files from the server’s file system. XSLT has built-in functions that can access local or remote XML files. An attacker can use this function to read sensitive information.

        Attacking Other Systems

        Attackers can use XSLT Injection to force the server to make network requests to other systems on the internal network that are not accessible from the internet.

        This could allow an attacker to: * Scan the internal network for open ports and active services. * Access internal, unprotected administrative panels. * Interact with cloud provider metadata services to steal access credentials.

        Denial of Service

        A malicious stylesheet can also be designed to consume a large amount of server resources, such as memory or CPU time. This can cause the application to slow down or crash, making it unavailable for legitimate users.
        An attacker could create a recursive stylesheet that never finishes, causing the processor to enter an infinite loop and exhaust all available CPU resources.

          Available In:
        • SonarQube CloudDetect issues in your GitHub, Azure DevOps Services, Bitbucket Cloud, GitLab repositories
        • SonarQube ServerAnalyze code in your
          on-premise CI

        © 2008-2025 SonarSource SA. All rights reserved.

        Privacy Policy | Cookie Policy | Terms of Use