The US cybersecurity agency CISA and the FBI on Monday published a ‘secure-by-design’ alert urging organizations to review their software products to eliminate SQL injection vulnerabilities.
Also referred to as SQLi, SQL injection flaws represent a persistent class of security defects in commercial software, despite extensive documentation and the existence of effective mitigations.
Products vulnerable to SQLi, CISA and the FBI say, put many customers at risk, as evidenced by last year’s cyberattack on Progress Software’s managed file transfer (MFT) solution MOVEit Transfer.
“CISA and the FBI urge senior executives at technology manufacturers to mount a formal review of their code to determine its susceptibility to SQLi compromises and encourage all technology customers to ask their vendors whether they have conducted such a review,” CISA and the FBI note in their alert (PDF).
If such bugs are discovered, organizations should immediately start implementing mitigations to “eliminate this entire class of defect from all current and future software products”.
According to CISA and the FBI, a secure-by-design approach to software development can eliminate SQLi vulnerabilities and reasonably protect products from malicious exploitation.
“Incorporating this mitigation at the outset—beginning in the design phase and continuing through development, release, and updates—reduces the burden of cybersecurity on customers and risk to the public,” the two agencies say.
SQLi flaws allow for the insertion of user-supplied input directly into SQL commands, leading to the execution of arbitrary queries and allowing threat actors to steal sensitive information and tamper with the information in the database.
“SQLi vulnerabilities are caused by software developers’ inattention to security best practices, resulting in the co-mingling of database queries and user-supplied data. SQL injections succeed because software developers fail to treat user-supplied content as potentially malicious,” CISA and the FBI note.
To prevent SQLi vulnerabilities, “developers should use parameterized queries with prepared statements to separate SQL code from user-supplied data,” thus ensuring that the user input is not treated as executable code and interpreted as a SQL statement.
Additionally, software makers are advised to take ownership of customer security outcomes, embrace transparency and accountability when disclosing vulnerabilities, and invest in building the structures that promote security, in line with previously outlined secure-by-design principles.
“Leaders should highlight the importance of rooting out entire classes of vulnerabilities rather than addressing them on a case-by-case basis. Additionally, leaders should establish organizational structures that prioritize proactive measures, such as adopting secure coding practices like parameterized queries, to create enduring security and reduce reliance on reactive responses,” CISA and the FBI say.
Related: CISA Debuts ‘Secure by Design’ Alert Series
Related: CISA Introduces Secure-by-design and Secure-by-default Development Principles
Related: Federal Push for Secure-by-Design: What It Means for Developers