

{"id":3603,"date":"2022-03-22T16:49:32","date_gmt":"2022-03-22T13:49:32","guid":{"rendered":"https:\/\/csirt.lacnic.net\/?p=3603"},"modified":"2022-03-25T17:56:27","modified_gmt":"2022-03-25T14:56:27","slug":"how-to-prevent-sql-injection-attacks","status":"publish","type":"post","link":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks","title":{"rendered":"How to prevent SQL injection attacks"},"content":{"rendered":"\n<p>SQL injection attacks are a very popular web hacking technique. Known as SQLi, these attacks occur when one or more valid SQL statements are \u201cinjected\u201d into an input field to be processed by an underlying database.&nbsp;<\/p>\n\n\n\n<p>Structured Query Language (SQL) is a command-and-control language for relational databases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How is an SQL injection attack performed?<\/strong><\/h2>\n\n\n\n<p>An attack occurs when an application accepts data from unreliable sources \u2014&nbsp;data that has been modified to be interpreted as code&nbsp;\u2014 and does not perform a proper validation before using the data to perform a dynamic query on the database.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Attack vectors<\/strong><\/h2>\n\n\n\n<p>When designing an application, it is important to keep in mind that any user-entered data can be modified arbitrarily.<\/p>\n\n\n\n<p>Attacks on web applications are usually performed by modifying parameters in the URL, using the <em>HTTP GET<\/em> method or, as we will see in the examples below, modifying any type of data input with the <em>HTTP POST<\/em> method. Depending on how the web application is designed, this vulnerability can be exploited either by modifying HTTP headers such as User Agent, cookies, referrer, or the system&#8217;s own headers.<\/p>\n\n\n\n<p>Other potential attack vectors should also be considered, for example, bar code readers, QR readers, or video cameras with text recognition.<\/p>\n\n\n\n<p>It is important to note that attackers may be either external or members of the affected organization.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What are the possible consequences of an SQL injection attack?<\/strong><\/h2>\n\n\n\n<p>Any unwanted action executed on a database as a result of an SQLi attack can affect one or more information security pillars.&nbsp;<\/p>\n\n\n\n<p>A successful attack can allow the attacker to perform different actions that affect the confidentiality, integrity, and\/or availability of the information contained in the database.<\/p>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Confidentiality can be affected if sensitive information is accessed without the required authorization.<\/li><li>Integrity can be affected if information is deleted or altered without the required authorization.<\/li><li>Availability can be affected if the information is not available when it is needed, either because it cannot be accessed or because it has been previously modified without the required authorization.<\/li><\/ul>\n\n\n\n<p>Other vulnerabilities that an SQLi attack might exploit include authentication failures and\/or the modification of a user&#8217;s profile authorization to perform certain actions on a resource. For example, in case of an attack against a database where user keys are stored, obfuscating the keys with robust cryptographic hashes would prevent unauthorized access to the keys and their potential use by an attacker.<\/p>\n\n\n\n<p>For all the above, a successful SQLi attack simultaneously affects several different pillars of information security.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to prevent an SQL injection attack<\/strong><\/h2>\n\n\n\n<p>There are different types of measures that can be considered when a system needs to communicate with a relational database using SQL.<\/p>\n\n\n\n<p>Some of the basic measures that should be implemented include:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Use of parameterized queries: prepared statements<\/li><li>Use of procedures: stored procedures<\/li><li>Validation of user data entry<\/li><li>Escaping all authorized user entries<\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use of parameterized queries: prepared statements<\/strong><\/h3>\n\n\n\n<p>Preparing SQL statements and storing them in a variable before their execution is a simple and secure way for developers to work. Doing this ahead of time ensures that an attacker will not be able to insert statements into our database, as shown in the second example below.<\/p>\n\n\n\n<p>The most popular languages \u200b\u200bhave methods to securely parameterize statements requiring user-supplied input. These languages include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Java EE &#8211; use PreparedStatement() in our bind variables<\/li><li>.NET &#8211; use parameterized queries such as SqlCommand() or OleDbCommand() in our bind variables<\/li><li>PHP &#8211; PDOs can be used for generic databases with a strong parameterization of queries or, if using a specific database driver, it is necessary to find a secure function to prepare our statement. For example, in the case of MySQL, bind_param() should be used.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use of procedures: stored procedures<\/strong><\/h3>\n\n\n\n<p>When executing procedures directly on the database, care must be taken not to include the generation of unsecure dynamic SQL statements. These procedures must have their inputs validated and an adequate &#8220;escape&#8221; functionality.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Validation of user-supplied data<\/strong><\/h3>\n\n\n\n<p>User-supplied data must always be properly validated, not only to prevent SQL injections.&nbsp;<\/p>\n\n\n\n<p>The use of dynamic variables for table or column names is not recommended, neither is specifying sort order (ASC or DESC). If necessary, prior validations should be used, such as converting the inputs to Boolean variables or using SWITCH, Sort of, or other functions.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Escaping all authorized user entries: escape characters<\/strong><\/h3>\n\n\n\n<p>Escaping user-supplied inputs to convert them to another format such as strings should be used with care, as this does not prevent every injection. The escape characters technique depends on each database engine, so it is important to implement further controls and validations to keep attackers from bypassing this measure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Examples<\/strong><\/h2>\n\n\n\n<p>Below are some examples of code that would enable SQLi attacks.<\/p>\n\n\n\n<p>Example 1: Separating results into pages, using PHP and Postgres.<\/p>\n\n\n\n<pre>    <code> \n        <p>&lt;?php<\/p>\n        <p>$\u00edndice&nbsp; &nbsp; = $argv[0];&nbsp;<\/p>\n        <p>$consulta&nbsp; = \"SELECT id, name FROM products ORDER BY name LIMIT 20 OFFSET $\u00edndice;\";<\/p>\n        <p>$resultado = pg_query($conexi\u00f3n, $consulta);<\/p> \n        <p>?&gt;<\/p> \n    <\/code>\n<\/pre>\n\n\n\n<p>A user typically clicks the \u201cnext\u201d and \u201cback\u201d buttons to browse between results, which would change the decimal value of the \u201cindex\u201d variable in the URL.&nbsp;<\/p>\n\n\n\n<p>This behavior would not cause any issues, but if a malicious agent were to decide to add the following code to the URL:<\/p>\n\n\n\n<pre><code><p dir=\"ltr\">0;<\/p>\n<p dir=\"ltr\">insert into pg_shadow(usename,usesysid,usesuper,usecatupd,passwd)<\/p>\n<p dir=\"ltr\">&nbsp;&nbsp;&nbsp;&nbsp;select 'crack', usesysid, 't','t','crack'<\/p>\n<p dir=\"ltr\">&nbsp;&nbsp;&nbsp;&nbsp;from pg_shadow where usename='postgres';<\/p>\n<p dir=\"ltr\">--<\/p><\/code><\/pre>\n\n\n\n<p>the <em>$consulta<\/em> variable would look like this:<\/p>\n\n\n\n<pre><code><p dir=\"ltr\">$consulta&nbsp; = \"SELECT id, name FROM products ORDER BY name LIMIT 20 OFFSET 0;<\/p>\n<p dir=\"ltr\">insert into pg_shadow(usename,usesysid,usesuper,usecatupd,passwd)<\/p>\n<p dir=\"ltr\">&nbsp;&nbsp;&nbsp;&nbsp;select 'superusuario', usesysid, 't','t','password'<\/p>\n<p dir=\"ltr\">&nbsp;&nbsp;&nbsp;&nbsp;from pg_shadow where usename='postgres';<\/p>\n<p dir=\"ltr\">--;\"<\/p><\/code><\/pre>\n\n\n\n<p>As a result, a \u201csuperuser\u201d user would be created with privileges, who would then be able to perform malicious activities such as those described earlier in this article.<\/p>\n\n\n\n<p>One way to fix this problem would be to use PDOs (PHP Data Objects):<\/p>\n\n\n\n<pre><code><p dir=\"ltr\">&lt;?php<\/p> \n<p dir=\"ltr\">$stmt&nbsp; = $pdo-&gt;prepare(\"SELECT id, name FROM products ORDER BY name LIMIT 20 OFFSET :\u00edndice;\");<\/p>\n<p dir=\"ltr\">$\u00edndice = $argv[0];&nbsp;<\/p>\n<p dir=\"ltr\">$stmt-&gt;bindParam(':indice', $indice);<\/p>\n<p dir=\"ltr\">$stmt-&gt;execute()<\/p>\n<p dir=\"ltr\">?&gt;<\/p><\/code><\/pre>\n\n\n\n<p>Example 2: Authentication bypass<\/p>\n\n\n\n<p>Suppose a web application has an authentication form that accepts a username and password as inputs.<\/p>\n\n\n\n<p>This form is being processed by code containing the following SQL statement:<\/p>\n\n\n\n<pre><code><p>consulta = \"SELECT * FROM users WHERE username = \"'\" + username + \"' AND password = '\" + password + \"'\"<\/p><\/code><\/pre>\n\n\n\n<p>As we can see, the query to the database is built using SQL statements and the user-supplied values are assigned directly to the variables.&nbsp;<\/p>\n\n\n\n<p>In this case, a malicious user could enter <em>admin<\/em> as the user and <em>pass&#8217; OR &#8216;1&#8217;=&#8217;1<\/em> as the password.<\/p>\n\n\n\n<p>The final query to the database would look like this:<\/p>\n\n\n\n<pre><code><p>consulta = SELECT * FROM users WHERE username = 'admin' AND (password = ' pass' OR '1'='1 ')<\/p><\/code><\/pre>\n\n\n\n<p>Given that the Boolean condition will always be true, this query would fetch all the data associated with privileged user &#8216;<em>admin<\/em>&#8216;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>SQL injection attacks are preventable if the necessary controls are implemented during the application development phase.<\/p>\n\n\n\n<p>Developer teams should have a procedure that includes best practices for secure software development, including a prudent time for the testing phase prior to going into production.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Authors:<\/strong> Graciela Martinez, Guillermo Pereyra<\/p>\n\n\n\n<p><strong>Date: <\/strong>22\/03\/2022<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>References:<\/strong><\/h2>\n\n\n<p><a href=\"https:\/\/blog.sucuri.net\/2022\/01\/understanding-website-sql-injections.html\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.sucuri.net\/2022\/01\/understanding-website-sql-injections.html<\/a><\/p>\n<p><a href=\"https:\/\/owasp.org\/Top10\/A03_2021-Injection\/\" target=\"_blank\" rel=\"noopener\">https:\/\/owasp.org\/Top10\/A03_2021-Injection\/<\/a><\/p>\n<p><a href=\"https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/SQL_Injection_Prevention_Cheat_Sheet.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cheatsheetseries.owasp.org\/cheatsheets\/SQL_Injection_Prevention_Cheat_Sheet.html<\/a><\/p>\n<p>&nbsp;<a href=\"https:\/\/www.esecurityplanet.com\/threats\/how-to-prevent-sql-injection-attacks\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.esecurityplanet.com\/threats\/how-to-prevent-sql-injection-attacks\/<\/a><\/p>\n<p><a href=\"https:\/\/www.php.net\/manual\/es\/security.database.sql-injection.php\" target=\"_blank\" rel=\"noopener\">https:\/\/www.php.net\/manual\/es\/security.database.sql-injection.php<\/a><\/p>\n<p><a href=\"https:\/\/www.esecurityplanet.com\/threats\/how-to-prevent-sql-injection-attacks\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.esecurityplanet.com\/threats\/how-to-prevent-sql-injection-attacks\/ <\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>SQL injection attacks are a very popular web hacking technique. Known as SQLi, these attacks occur when one or more valid SQL statements are \u201cinjected\u201d into an input field to be processed by an underlying database.&nbsp; Structured Query Language (SQL) is a command-and-control language for relational databases. How is an SQL injection attack performed? An [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[46,15],"tags":[],"class_list":["post-3603","post","type-post","status-publish","format-standard","hentry","category-archive","category-news-articles"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LACNIC CSIRT - How to prevent SQL injection attacks<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LACNIC CSIRT - How to prevent SQL injection attacks\" \/>\n<meta property=\"og:description\" content=\"SQL injection attacks are a very popular web hacking technique. Known as SQLi, these attacks occur when one or more valid SQL statements are \u201cinjected\u201d into an input field to be processed by an underlying database.&nbsp; Structured Query Language (SQL) is a command-and-control language for relational databases. How is an SQL injection attack performed? An [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks\" \/>\n<meta property=\"og:site_name\" content=\"LACNIC CSIRT\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-22T13:49:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-25T14:56:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/csirt.lacnic.net\/wp-content\/uploads\/lacnic-csirt-2020.png\" \/>\n\t<meta property=\"og:image:width\" content=\"680\" \/>\n\t<meta property=\"og:image:height\" content=\"330\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Guillermo Pereyra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lacnic_csirt\" \/>\n<meta name=\"twitter:site\" content=\"@lacnic_csirt\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks\"},\"author\":{\"name\":\"Guillermo Pereyra\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#\\\/schema\\\/person\\\/f3867c056facaafc23b5706e3b3374c2\"},\"headline\":\"How to prevent SQL injection attacks\",\"datePublished\":\"2022-03-22T13:49:32+00:00\",\"dateModified\":\"2022-03-25T14:56:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks\"},\"wordCount\":1109,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#organization\"},\"articleSection\":[\"Archive\",\"News &amp; Articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks\",\"url\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks\",\"name\":\"LACNIC CSIRT - How to prevent SQL injection attacks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#website\"},\"datePublished\":\"2022-03-22T13:49:32+00:00\",\"dateModified\":\"2022-03-25T14:56:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/news-articles\\\/how-to-prevent-sql-injection-attacks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to prevent SQL injection attacks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/\",\"name\":\"LACNIC CSIRT\",\"description\":\"Incident Response Center - LACNIC CSIRT\",\"publisher\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#organization\",\"name\":\"LACNIC CSIRT\",\"url\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/csirt.lacnic.net\\\/wp-content\\\/uploads\\\/lacnic-csirt-2020.png\",\"contentUrl\":\"https:\\\/\\\/csirt.lacnic.net\\\/wp-content\\\/uploads\\\/lacnic-csirt-2020.png\",\"width\":680,\"height\":330,\"caption\":\"LACNIC CSIRT\"},\"image\":{\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/lacnic_csirt\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/#\\\/schema\\\/person\\\/f3867c056facaafc23b5706e3b3374c2\",\"name\":\"Guillermo Pereyra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g\",\"caption\":\"Guillermo Pereyra\"},\"url\":\"https:\\\/\\\/csirt.lacnic.net\\\/en\\\/author\\\/guillermopereyra\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LACNIC CSIRT - How to prevent SQL injection attacks","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks","og_locale":"en_US","og_type":"article","og_title":"LACNIC CSIRT - How to prevent SQL injection attacks","og_description":"SQL injection attacks are a very popular web hacking technique. Known as SQLi, these attacks occur when one or more valid SQL statements are \u201cinjected\u201d into an input field to be processed by an underlying database.&nbsp; Structured Query Language (SQL) is a command-and-control language for relational databases. How is an SQL injection attack performed? An [&hellip;]","og_url":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks","og_site_name":"LACNIC CSIRT","article_published_time":"2022-03-22T13:49:32+00:00","article_modified_time":"2022-03-25T14:56:27+00:00","og_image":[{"width":680,"height":330,"url":"https:\/\/csirt.lacnic.net\/wp-content\/uploads\/lacnic-csirt-2020.png","type":"image\/png"}],"author":"Guillermo Pereyra","twitter_card":"summary_large_image","twitter_creator":"@lacnic_csirt","twitter_site":"@lacnic_csirt","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks#article","isPartOf":{"@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks"},"author":{"name":"Guillermo Pereyra","@id":"https:\/\/csirt.lacnic.net\/en\/#\/schema\/person\/f3867c056facaafc23b5706e3b3374c2"},"headline":"How to prevent SQL injection attacks","datePublished":"2022-03-22T13:49:32+00:00","dateModified":"2022-03-25T14:56:27+00:00","mainEntityOfPage":{"@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks"},"wordCount":1109,"commentCount":0,"publisher":{"@id":"https:\/\/csirt.lacnic.net\/en\/#organization"},"articleSection":["Archive","News &amp; Articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks#respond"]}]},{"@type":"WebPage","@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks","url":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks","name":"LACNIC CSIRT - How to prevent SQL injection attacks","isPartOf":{"@id":"https:\/\/csirt.lacnic.net\/en\/#website"},"datePublished":"2022-03-22T13:49:32+00:00","dateModified":"2022-03-25T14:56:27+00:00","breadcrumb":{"@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/csirt.lacnic.net\/en\/news-articles\/how-to-prevent-sql-injection-attacks#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/csirt.lacnic.net\/en"},{"@type":"ListItem","position":2,"name":"How to prevent SQL injection attacks"}]},{"@type":"WebSite","@id":"https:\/\/csirt.lacnic.net\/en\/#website","url":"https:\/\/csirt.lacnic.net\/en\/","name":"LACNIC CSIRT","description":"Incident Response Center - LACNIC CSIRT","publisher":{"@id":"https:\/\/csirt.lacnic.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/csirt.lacnic.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/csirt.lacnic.net\/en\/#organization","name":"LACNIC CSIRT","url":"https:\/\/csirt.lacnic.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/csirt.lacnic.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/csirt.lacnic.net\/wp-content\/uploads\/lacnic-csirt-2020.png","contentUrl":"https:\/\/csirt.lacnic.net\/wp-content\/uploads\/lacnic-csirt-2020.png","width":680,"height":330,"caption":"LACNIC CSIRT"},"image":{"@id":"https:\/\/csirt.lacnic.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/lacnic_csirt"]},{"@type":"Person","@id":"https:\/\/csirt.lacnic.net\/en\/#\/schema\/person\/f3867c056facaafc23b5706e3b3374c2","name":"Guillermo Pereyra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ae7955fedf808dbd938ccb483f65b33402042ab00726dbf7e21dd6a347333a9c?s=96&d=mm&r=g","caption":"Guillermo Pereyra"},"url":"https:\/\/csirt.lacnic.net\/en\/author\/guillermopereyra"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/posts\/3603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/comments?post=3603"}],"version-history":[{"count":0,"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/posts\/3603\/revisions"}],"wp:attachment":[{"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/media?parent=3603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/categories?post=3603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csirt.lacnic.net\/en\/wp-json\/wp\/v2\/tags?post=3603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}