{"id":8596,"date":"2020-03-08T19:59:37","date_gmt":"2020-03-08T14:29:37","guid":{"rendered":"https:\/\/www.getastra.com\/blog\/cms\/symfony-laravel-codeingiter-security-audit\/"},"modified":"2026-05-27T12:52:25","modified_gmt":"2026-05-27T07:22:25","slug":"symfony-laravel-codeingiter-security-audit","status":"publish","type":"post","link":"https:\/\/www.getastra.com\/blog\/security-audit\/symfony-laravel-codeingiter-security-audit\/","title":{"rendered":"How to Do a Security Audit of Symfony, Laravel &#038; Codeigniter Frameworks?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PHP is still widely used to develop websites and open-source CMSes. However, developing large applications using PHP can turn out to be time-consuming. So to overcome that, certain frameworks like Symfony, Laravel, and Codeigniter are used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These frameworks come with certain pre-built components that can be reused to develop web applications faster and easier. However, even these frameworks are not entirely secure. A small vulnerability in any one of them can seep down to thousands of web apps developed using them. To check such bugs beforehand you can conduct a Symfony security audit, Laravel security audit or Codeigniter security audit.<\/p>\n\n\n\n\n\n<p class=\"wp-block-paragraph\">Today we are going to discuss the common security issues in these frameworks and how to overcome them with a thorough security audit.<\/p>\n\n\n\n<h2 id=\"1rp35\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Symfony\"><\/span>1. Symfony<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/symfony.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">official website<\/a> of Symfony describes it as,<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Symfony is a set of reusable PHP components and a PHP framework for web projects.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">And rightly so. It contains a collection of frequently used components. For example, while building multiple web applications, you will need an authentication component of some sort. So, instead of re-building the login component every time, Symfony can create one for you on the go. Similarly, it contains other commonly used components like forms, filesystem, etc.<\/p>\n\n\n\n<h3 id=\"22kbn\" class=\"wp-block-heading\">Need for Symfony Security Audit<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Building your web app using Symfony is easy, however, it does not imply that it is free of vulnerabilities. Symfony has had its <a href=\"https:\/\/www.cvedetails.com\/vulnerability-list\/vendor_id-11981\/product_id-22402\/Sensiolabs-Symfony.html\" target=\"_blank\" rel=\"noopener noreferrer\">fair share of vulnerabilities<\/a> in the past. Many of its components were found vulnerable to XSS, SQLi, etc attacks. For instance, <strong>symfony\/http-foundation <\/strong>was found vulnerable to SQLi and XSS bugs termed as <strong><a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2019-10913\" target=\"_blank\" rel=\"noopener noreferrer\">CVE-2019-10913<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In all these cases, the vulnerability of one component could have compromised thousands of web apps using that component.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid such a scenario, it becomes very necessary to find and patch these vulnerabilities. <a href=\"https:\/\/www.getastra.com\/vapt\/symfony-vapt\" data-type=\"link\" data-id=\"https:\/\/www.getastra.com\/vapt\/symfony-vapt\">Conducting a Symfony security audit<\/a> helps you with that and more.<\/p>\n\n\n\n<figure class=\"wp-block-image image regular\"><img decoding=\"async\" src=\"\/cdn-cgi\/image\/quality=80,format=auto,onerror=redirect,metadata=none\/https:\/\/images.storychief.com\/account_5336\/PHP-Security-Issues_d75cdd374f02077e64b265262b50e6dc_800.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Security issues in PHP<\/figcaption><\/figure>\n\n\n\n<h2 id=\"7tnkb\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Laravel\"><\/span>2. Laravel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to Symfony, Laravel is a framework that makes it easy to develop web applications. Laravel is very diversified and has a big web ecosystem. According to the <a href=\"https:\/\/laravel.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">official website<\/a> of Laravel,<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in most web projects.<\/p>\n<\/blockquote>\n\n\n\n<h3 id=\"bg352\" class=\"wp-block-heading\">Need For Laravel Security Audit<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although the Laravel code is checked by the community for security errors, yet one or two usually slips by. For instance, the Laravel framework versions 5.5.40 and 5.6.x through 5.6.29, were found vulnerable to remote code execution. Termed as <strong><a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2018-15133\" target=\"_blank\" rel=\"noopener noreferrer\">CVE-2018-15133<\/a><\/strong>, this bug was caused due to a vulnerable <strong>X-XSRF-TOKEN<\/strong> value. What is more alarming is that there exists a <a href=\"https:\/\/www.rapid7.com\/db\/modules\/exploit\/unix\/http\/laravel_token_unserialize_exec\" target=\"_blank\" rel=\"noopener noreferrer\">Metasploit module<\/a> to exploit the same!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes <a href=\"https:\/\/www.getastra.com\/vapt\/laravel-vapt\" data-type=\"link\" data-id=\"https:\/\/www.getastra.com\/vapt\/laravel-vapt\">conducting a Laravel security audit<\/a> a must. It can help in checking your web app for any such vulnerabilities and save you from any misfortune whatsoever. A vulnerability assessment also helps in patching them before the web app goes live.<\/p>\n\n\n\n\n\n<h2 id=\"940ko\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Codeigniter\"><\/span>3. Codeigniter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the series of PHP frameworks mentioned above, coming next is Codeigniter. Codeigniter is another powerful and lightweight framework used to build web apps. It also consists of clear documentation that helps anyone learn it efficiently. Another big advantage of Codeigniter is that it offers a simple routing method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/codeigniter.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">official website<\/a> of Codeigniter defines it as,<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.<\/p>\n<\/blockquote>\n\n\n\n<h3 id=\"b3srd\" class=\"wp-block-heading\">Need for Codeigniter Security Audit<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Using a framework to develop PHP web apps does not always guarantee security. For instance, CodeIgniter prior to 3.1.3 was found vulnerable to a remote code execution bug. This was termed as <strong><a href=\"https:\/\/www.cvedetails.com\/cve\/CVE-2016-10131\/\" target=\"_blank\" rel=\"noopener noreferrer\">CVE-2016-10131<\/a><\/strong> and was caused due to vulnerable <strong>system\/libraries\/Email.php<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This meant that all the web apps which had used the Email.php of Codeigniter before 3.1.3 were also vulnerable to RCE. To catch such bugs before hackers exploit them, performing a Codeigniter security audit is necessary. Indulging in a periodic security audit ensures the safety of your web app in the long run.<\/p>\n\n\n\n<div class=\"convertful-28241\"><\/div>\n\n\n\n<h2 id=\"8s7lj\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_perform_a_security_audit_of_Symfony_Laravel_or_Codeigniter\"><\/span>How to perform a security audit of Symfony, Laravel or Codeigniter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Since all the above-mentioned frameworks use PHP, a set of common tools can be used for the security audit of web apps developed using these frameworks. These tools can be installed manually too but it is advisable to use Kali Linux for this purpose for Kali Linux comes preloaded with most of these tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are a window user and wish to use it using a virtual box, you can <a aria-label=\"set it up like this (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/www.getastra.com\/blog\/security-audit\/how-to-hack-windows-xp-using-metasploit-kali-linux-ms08067\/#Setup_Used_for_Practicing_Metasploit_Basics\" target=\"_blank\" class=\"rank-math-link\">set it up like this<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the setup is done, you are ready for the security audit part so let&#8217;s dive in!<\/p>\n\n\n\n<h3 id=\"aepph\" class=\"wp-block-heading\">1. PhpStan<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This tool is widely used to security audit the static code of the PHP web app generated by the above-mentioned frameworks. This tool is not included in the official Kali bundle so you will have to <a aria-label=\"download and install it manually (opens in a new tab)\" rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/phpstan\/phpstan#installation\" target=\"_blank\" class=\"rank-math-link\">download and install it manually<\/a>. Once installed, you are ready to use PhpStan. Now suppose the files of your web app are in the tests and src folders. Then, open the terminal and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vendor\/bin\/phpstan analyse src tests<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, PhpStan has unofficial extensions specifically for Laravel known as <a href=\"https:\/\/github.com\/nunomaduro\/larastan\" target=\"_blank\" rel=\"noopener noreferrer\">Larastan<\/a> and <a href=\"https:\/\/github.com\/phpstan\/phpstan-symfony\" target=\"_blank\" rel=\"noopener noreferrer\">one for Symfony<\/a> too. So you might want these based on specific frameworks.<\/p>\n\n\n\n<h3 id=\"67aoc\" class=\"wp-block-heading\">2. Sqlmap<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The SQL injection is one of the most common vulnerabilities found in the web apps during a Symfony, Laravel or Codeigniter security audit. This bug can be hunted by using <a href=\"https:\/\/github.com\/sqlmapproject\/sqlmap\" target=\"_blank\" rel=\"noopener noreferrer\">Sqlmap<\/a>. You can either test your web app for SQLi bugs live on the internet or you can test them on your local server. For example, the page you wish to test for SQLi is &#8220;<strong>test.php&#8221;<\/strong> and parameter is &#8220;<strong>param<\/strong>&#8221; then, open the terminal in Kali and type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sqlmap -u \"www.example.com\/test.php?param=1\" --dbs --random-agent --dbs<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will try to check <strong>test.php<\/strong> for SQLi vulnerability. If present, Sqlmap will try to enumerate database names too. For more detailed usage options, refer to the <a href=\"https:\/\/github.com\/sqlmapproject\/sqlmap\/wiki\/Usage\" target=\"_blank\" rel=\"noopener noreferrer\">official documentation<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image image regular\"><img decoding=\"async\" src=\"\/cdn-cgi\/image\/quality=80,format=auto,onerror=redirect,metadata=none\/https:\/\/images.storychief.com\/account_5336\/sqlmap_d8c08c616fdb294eb47b35fe5ac1f4a5_800.png\" alt=\"Symfony security audit Laravel security audit Codeigniter security audit\"\/><\/figure>\n\n\n\n\n\n<h3 id=\"cqusu\" class=\"wp-block-heading\">3. Xsser<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Another most common bug found during a Laravel, Codeigniter or Symfony security audit is an XSS vulnerability. These can be hunted down using <a href=\"https:\/\/xsser.03c8.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">Xsser<\/a>; a tool to discover as well as exploit XSS bugs by bypassing security filters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Beginners may find it easy to use this tool using the graphical interface (GUI). So, open the terminal in Kali and type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">xsser --gtk<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In case this command does not work or you have not set the environment variables then try:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">python3 xsser --gtk<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will open a graphical interface like the one in the image below. Just set the necessary options and start finding XSS bugs. For more details on the options, refer to the <a href=\"https:\/\/xsser.03c8.net\/#docs\" target=\"_blank\" rel=\"noopener noreferrer\">documentation of this tool<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image image regular\"><img decoding=\"async\" src=\"\/cdn-cgi\/image\/quality=80,format=auto,onerror=redirect,metadata=none\/https:\/\/images.storychief.com\/account_5336\/xsser_1f6961454f92a576c4eb907c4b388c77_800.png\" alt=\"Symfony security audit Laravel security audit codeigniter security audit\"\/><\/figure>\n\n\n\n<h3 id=\"7bk9c\" class=\"wp-block-heading\">4. Fimap<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">File inclusion vulnerabilities are also commonly found in most web apps along with XSS and SQLi bugs. To scan your web app developed using Laravel, Symfony or Codeigniter for file inclusion bugs, Fimap can be used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if you wish to scan the &#8220;<strong>index.php<\/strong>&#8221; page for file inclusion vulnerabilities, open the terminal in Kali and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fimap -u \"http:\/\/www.example.com\/index.php\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For more info on the usage, in the terminal type:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">fimap -h<\/pre>\n\n\n\n<h2 id=\"bilt4\" class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Security_Audit_Service_for_Symfony_Laravel_Codeigniter\"><\/span><strong>Security Audit Service for Symfony, Laravel, Codeigniter<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This article is just an introduction to Symfony, Codeigniter, and Laravel security audit. it barely scratches the surface and covers only the basics. There is a lot that needs to be checked to ensure the security of web apps developed using these frameworks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is why to ensure maximum security it is recommended to go for a <a href=\"https:\/\/www.getastra.com\/php-vapt\" target=\"_blank\" rel=\"noopener noreferrer\">professional security audit<\/a>. Astra contains a very flexible security and penetration testing plan. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It doesn&#8217;t matter if you own a small blog or run an online store, Astra has something for everyone at <a href=\"https:\/\/www.getastra.com\/php-vapt#securityAuditFrequencySelection\" target=\"_blank\" rel=\"noopener noreferrer\">very affordable prices<\/a>. Its comprehensive security audit covers major issues like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Configuration and Deployment Mis-configuration.<\/li>\n\n\n\n<li>PHP Core, Plugins &amp; Theme Specific Vulnerabilities.<\/li>\n\n\n\n<li>Broken or Improper Authentication.<\/li>\n\n\n\n<li>Identifying Technical &amp; Business Logic Vulnerabilities.<\/li>\n\n\n\n<li>1250+ Active Security Tests.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image image regular\"><img decoding=\"async\" src=\"\/cdn-cgi\/image\/quality=80,format=auto,onerror=redirect,metadata=none\/https:\/\/images.storychief.com\/account_5336\/VAPTSecurityProcess_9c512da2449a51b664f481a2e9e23821_800.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Still, have some doubts? Leave a comment below or drop us a message using the chat widget.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><!-- strchf script --><script>        if(window.strchfSettings === undefined) window.strchfSettings = {};    window.strchfSettings.stats = {url: \"https:\/\/astra-security.storychief.io\/symfony-laravel-codeingiter-security-audit?id=1028999881&type=2\",title: \"How to Do a Security Audit of Symfony, Laravel and Codeigniter Frameworks?\",id: \"8584b87e-9542-4b5e-bebf-59f4ae0db88b\"};            (function(d, s, id) {      var js, sjs = d.getElementsByTagName(s)[0];      if (d.getElementById(id)) {window.strchf.update(); return;}      js = d.createElement(s); js.id = id;      js.src = \"https:\/\/d37oebn0w9ir6a.cloudfront.net\/scripts\/v0\/strchf.js\";      js.async = true;      sjs.parentNode.insertBefore(js, sjs);    }(document, 'script', 'storychief-jssdk'))    <\/script><!-- End strchf script --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP is still widely used to develop websites and open-source CMSes. However, developing large applications using PHP can turn out to be time-consuming. So to overcome that, certain frameworks like Symfony, Laravel, and Codeigniter are used. These frameworks come with certain pre-built components that can be reused to develop web applications faster and easier. However, &#8230; <a title=\"How to Do a Security Audit of Symfony, Laravel &#038; Codeigniter Frameworks?\" class=\"read-more\" href=\"https:\/\/www.getastra.com\/blog\/security-audit\/symfony-laravel-codeingiter-security-audit\/\" aria-label=\"Read more about How to Do a Security Audit of Symfony, Laravel &#038; Codeigniter Frameworks?\">Read more<\/a><\/p>\n","protected":false},"author":24,"featured_media":9979,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[340],"tags":[],"class_list":["post-8596","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security-audit"],"_links":{"self":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/8596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/comments?post=8596"}],"version-history":[{"count":11,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/8596\/revisions"}],"predecessor-version":[{"id":47230,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/posts\/8596\/revisions\/47230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/media\/9979"}],"wp:attachment":[{"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/media?parent=8596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/categories?post=8596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.getastra.com\/blog\/wp-json\/wp\/v2\/tags?post=8596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}