Skip to content

Entities in software development strongly encouraged to eliminate SQL injection weaknesses

Federal authorities, specifically from CISA and the FBI, have connected incidents targeting MOVEit file transfer software to preventable flaws.

Developers urged to eradicate SQL injection vulnerabilities in software
Developers urged to eradicate SQL injection vulnerabilities in software

Entities in software development strongly encouraged to eliminate SQL injection weaknesses

In a joint alert issued on Monday, the Cybersecurity and Infrastructure Security Agency (CISA) and the Federal Bureau of Investigation (FBI) have called upon software manufacturers to address SQL injection vulnerabilities in their products.

The agencies' concern stems from the role SQL injection defects played in the widespread attacks linked to MOVEit file transfer software in 2023. Security expert Spencer McIntyre, the security research manager and head of Metasploit development at Rapid7, believes that migrating to prepared statements is a reasonable ask but may not be easy for all software producers.

CISA officials are advocating for software and hardware manufacturers to make their products secure by design and secure by default, as part of the Biden administration's national cybersecurity strategy. They suggest that developers can eliminate SQL injection vulnerabilities by making changes during the software design and development phases.

SQL, a programming language used to manage data in relational databases, is the focus of the CISA and FBI alert. The agencies recommend the use of "prepared statements" with parameterized queries to separate SQL code from user-supplied data, preventing SQL injection vulnerabilities.

The software industry has been aware of the risk of SQL injection flaws for decades, yet manufacturers have not taken sufficient steps to remove these defects from software. To address this, the agencies are asking companies to take immediate steps to eliminate these defects from existing and future software.

To effectively prevent SQL injection vulnerabilities, software manufacturers should consider the following key steps:

  1. Use Parameterized Queries or Prepared Statements: Avoid embedding user inputs directly in SQL queries. Instead, use parameterized queries or prepared statements which separate code from data, preventing attackers from injecting malicious SQL code.
  2. Validate All User Inputs: Implement strict input validation to only accept expected data formats, types, and characters. Validation should enforce whitelists where possible and reject any unexpected input before it reaches the database.
  3. Enforce Least Privilege Access: Restrict database access rights by applying the principle of least privilege, giving users and applications only the minimum permissions required.
  4. Use Stored Procedures Where Appropriate: Employ stored procedures to encapsulate SQL commands, which reduces direct exposure of raw SQL queries to user inputs.
  5. Keep Software Updated and Patched: Regularly update applications, databases, and frameworks to patch known vulnerabilities that could be exploited for SQL injection.
  6. Deploy Web Application Firewalls (WAFs): Use WAFs to detect and block SQL injection attempts before they reach the application. WAFs can analyze incoming traffic, monitor unusual query patterns, and alert administrators to suspicious activities.
  7. Continuous Monitoring and Detection: Utilize advanced security tools that use machine learning, rule-based, and behavioral detection techniques to identify and block SQL injection attacks in real time.
  8. Encrypt Sensitive Data: While this doesn’t prevent injection itself, encrypting data limits the potential damage if an injection attack is successful.

By systematically applying these safeguards—input validation, parameterization, privilege restriction, security patching, advanced monitoring, and protective technologies—software manufacturers can effectively prevent SQL injection vulnerabilities and protect their applications from exploitation.

No single step is sufficient alone; a multi-layered, defense-in-depth approach is the industry best practice as emphasized by cybersecurity agencies such as CISA and the FBI. In addition, the agencies are asking software manufacturers to conduct formal reviews of their code to identify SQL injection compromises.

  1. Recognizing the need for improved cybersecurity in data-and-cloud-computing, CISA and FBI urge software manufacturers to incorporate vulnerability mitigation against SQL injection during the design and development phases of their products, as part of a comprehensive approach for cybersecurity.
  2. To ensure the long-term security of their products, technology companies are strongly recommended to implement a multi-layered defense-in-depth strategy that includes the use of prepared statements, input validation, least privilege access, stored procedures, updates, web application firewalls, continuous monitoring, data encryption, and formal code reviews, as suggested by cybersecurity agencies like CISA and the FBI.

Read also:

    Latest