{"id":3179,"date":"2023-10-16T18:19:04","date_gmt":"2023-10-16T17:19:04","guid":{"rendered":"https:\/\/www.lrob.fr\/?p=3179"},"modified":"2023-10-17T10:10:22","modified_gmt":"2023-10-17T09:10:22","slug":"your-wordpress-site-is-vulnerable","status":"publish","type":"post","link":"https:\/\/archive-www.lrob.fr\/en\/blog\/internet\/wordpress\/securite-wordpress\/votre-site-wordpress-est-vulnerable\/","title":{"rendered":"Your WordPress site is vulnerable"},"content":{"rendered":"<p class=\"gutenify-section-c0886640-6c1d-11ee-af98-d919ebbe3618 wp-block-paragraph\">Many wonder how WordPress can be vulnerable to attack despite its popularity and following. Others are completely unaware of the risk. Analysis.<\/p>\n\n\n\n<div class=\"wp-block-group gutenify-section-c3ab0930-6c00-11ee-af98-d919ebbe3618 is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading gutenify-section-c5930310-6c00-11ee-af98-d919ebbe3618\">What is a vulnerability?<\/h2>\n\n\n\n<p class=\"gutenify-section-ca8c5ba0-6c00-11ee-af98-d919ebbe3618 wp-block-paragraph\">WordPress is programmed using the PHP language.<br>PHP code makes it possible to create \"dynamic\" sites. In other words, content is generated on each page by a PHP program. A dynamic site also enables interaction with visitors. In technical terms, it enables requests to be received and processed.<\/p>\n\n\n\n<p class=\"gutenify-section-31869280-6c15-11ee-af98-d919ebbe3618 wp-block-paragraph\">This strength is also a weakness in that it can leave room for unwanted interactions, enabling a website to be hacked.<br>This is known as a \"security flaw\" or \"vulnerability\".<\/p>\n\n\n\n<h3 class=\"wp-block-heading gutenify-section-5d2161e0-6c01-11ee-af98-d919ebbe3618\">PHP vulnerabilities<\/h3>\n\n\n\n<div class=\"wp-block-group gutenify-section-59d91910-6c1f-11ee-af98-d919ebbe3618 is-nowrap is-layout-flex wp-container-core-group-is-layout-3a62fba1 wp-block-group-is-layout-flex\" style=\"padding-top:0;padding-bottom:var(--wp--preset--spacing--50)\">\n<figure class=\"wp-block-image alignleft size-full gutenify-section-4a93a4c0-6c1f-11ee-af98-d919ebbe3618\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"106\" src=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/new-php-logo.png\" alt=\"\" class=\"wp-image-3353\" srcset=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/new-php-logo.png 200w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/new-php-logo-150x80.png 150w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<p class=\"gutenify-section-48a2d140-6c1f-11ee-af98-d919ebbe3618 wp-block-paragraph\">Vulnerabilities in PHP code can have various causes.<br>Here are a few common examples.<\/p>\n<\/div>\n\n\n\n<ol class=\"gutenify-section-52193bc0-6c46-11ee-af98-d919ebbe3618 wp-block-list\">\n<li class=\"gutenify-section-fbba8990-6c00-11ee-af98-d919ebbe3618\">Unvalidated input: When PHP code accepts user data, such as a form or query, without proper validation, it can be vulnerable to malicious code injection attacks.<\/li>\n\n\n\n<li class=\"gutenify-section-fbbcac70-6c00-11ee-af98-d919ebbe3618\">Excessive permissions: Assigning excessive permissions to files and users can enable unauthorized manipulation attacks.<\/li>\n\n\n\n<li class=\"gutenify-section-51d63f50-6c46-11ee-af98-d919ebbe3618\">Poor error handling: revealing sensitive information in error messages can give attackers clues to further exploit the system.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group gutenify-section-73b5f840-6c46-11ee-af98-d919ebbe3618 is-nowrap is-layout-flex wp-container-core-group-is-layout-3a88641f wp-block-group-is-layout-flex\">\n<div class=\"wp-block-group gutenify-section-6f88a240-6c46-11ee-af98-d919ebbe3618 has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"gutenify-section-57879d40-6c46-11ee-af98-d919ebbe3618 wp-block-paragraph\">In addition, there may be vulnerabilities in PHP. The PHP executor itself sometimes contains security holes if not kept up to date. (see image)<\/p>\n\n\n\n<p class=\"gutenify-section-baceb900-6c1f-11ee-af98-d919ebbe3618 wp-block-paragraph\">Other vulnerabilities not directly linked to PHP, such as XSS vulnerabilities, are also common. These allow malicious code to be executed.<\/p>\n\n\n\n<p class=\"gutenify-section-a9caba10-6c46-11ee-af98-d919ebbe3618 wp-block-paragraph\">Let's see how this works in practice for WordPress.<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large gutenify-section-e3b176d0-6c17-11ee-af98-d919ebbe3618\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"673\" src=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions-1024x673.png\" alt=\"\" class=\"wp-image-3337\" srcset=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions-1024x673.png 1024w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions-150x99.png 150w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions-300x197.png 300w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions-1536x1010.png 1536w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2023\/10\/php-supported-versions.png 1542w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Source: <a href=\"https:\/\/www.php.net\/supported-versions.php\" target=\"_blank\" rel=\"noopener\" title=\"\">Supported PHP versions<\/a><\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group gutenify-section-5bde1680-65ed-11ee-ab40-73a001de26da is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading gutenify-section-e6168e40-65e8-11ee-ab40-73a001de26da\">WordPress website vulnerabilities<\/h2>\n\n\n\n<h3 class=\"wp-block-heading gutenify-section-321534e0-65e9-11ee-ab40-73a001de26da\">Security vulnerabilities in WordPress<\/h3>\n\n\n\n<div class=\"wp-block-group gutenify-section-47dc2d70-6c41-11ee-af98-d919ebbe3618 is-nowrap is-layout-flex wp-container-core-group-is-layout-3a88641f wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image aligncenter size-thumbnail gutenify-section-384ae310-6c41-11ee-af98-d919ebbe3618\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2022\/06\/icons8-wordpress-480-150x150.png\" alt=\"\" class=\"wp-image-1269\" srcset=\"https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2022\/06\/icons8-wordpress-480-150x150.png 150w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2022\/06\/icons8-wordpress-480-300x300.png 300w, https:\/\/archive-www.lrob.fr\/wp-content\/uploads\/2022\/06\/icons8-wordpress-480.png 480w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/figure>\n\n\n\n<p class=\"gutenify-section-ec647a50-65e8-11ee-ab40-73a001de26da wp-block-paragraph\">WordPress is a robust content management system, but it includes nearly a million lines of PHP code (<a href=\"https:\/\/openhub.net\/p\/wordpress\/estimated_cost\" target=\"_blank\" rel=\"noopener\" title=\"\">924,096 lines<\/a> currently).<br>WordPress is also <a href=\"https:\/\/wordpress.org\/plugins\/\" target=\"_blank\" rel=\"noopener\" title=\"\">59,772 plugins<\/a> and <a href=\"https:\/\/wordpress.org\/themes\/\" target=\"_blank\" rel=\"noopener\" title=\"\">11,378 themes<\/a> available on <a href=\"https:\/\/wordpress.org\/\" target=\"_blank\" rel=\"noopener\" title=\"\">wordpress.org<\/a>. Millions more lines of code available for installation on your site.<br>This wealth of code creates fertile ground for security flaws. The more you multiply the code, the more you multiply the risk. So, every day, new vulnerabilities are discovered. They can be found in the core of WordPress, but also in installed themes and plugins.<\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading gutenify-section-e61ff1b0-6c0a-11ee-af98-d919ebbe3618\">Detecting, correcting and revealing vulnerabilities<\/h3>\n\n\n\n<p class=\"gutenify-section-f2d87990-6c0a-11ee-af98-d919ebbe3618 wp-block-paragraph\">If a party detects a flaw (an individual developer, a \"white hat\", a specialized security organization), it notifies the developers of the script containing the flaw.<\/p>\n\n\n\n<p class=\"gutenify-section-e53dfee0-6c46-11ee-af98-d919ebbe3618 wp-block-paragraph\">If the developers are reactive, they correct the flaw and publish the patch.<\/p>\n\n\n\n<p class=\"gutenify-section-f9322e30-6c46-11ee-af98-d919ebbe3618 wp-block-paragraph\">Then, typically 30 to 90 days after its discovery, the security flaw is publicly disclosed. On the one hand, to give credit for the discovery to the whistle-blower, and on the other, to warn script users of the risk involved in failing to update.<\/p>\n\n\n\n<h4 class=\"wp-block-heading gutenify-section-46add480-6c1e-11ee-af98-d919ebbe3618\">Current flaw not corrected<\/h4>\n\n\n\n<p class=\"gutenify-section-4ba04f40-6c1e-11ee-af98-d919ebbe3618 wp-block-paragraph\">WordPress currently features a <a href=\"https:\/\/patchstack.com\/database\/vulnerability\/wordpress\/wordpress-6-1-1-unauth-blind-ssrf-vulnerability\" target=\"_blank\" rel=\"noopener\" title=\"\">uncorrected flaw<\/a> since version 6.1.1 (i.e. several months ago). This allows you to use a website to execute requests to other targets. It can be mitigated by blocking access to xmlrpc.php and disabling WordPress pingbacks (which was done on all the sites I manage even before this flaw was detected).<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group gutenify-section-df03be80-6c1d-11ee-af98-d919ebbe3618 is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading gutenify-section-4e0108a0-65e9-11ee-ab40-73a001de26da\">When is WordPress vulnerable and what can you do about it?<\/h2>\n\n\n\n<h3 class=\"wp-block-heading gutenify-section-cd90ee70-6c13-11ee-af98-d919ebbe3618\">Vulnerabilities revealed<\/h3>\n\n\n\n<p class=\"gutenify-section-873b96d0-6c10-11ee-af98-d919ebbe3618 wp-block-paragraph\">When a vulnerability is revealed, all installations with the vulnerable script are inherently affected. If this is the case, hackers are likely to exploit the flaw.<\/p>\n\n\n\n<p class=\"gutenify-section-54d3d270-6c47-11ee-af98-d919ebbe3618 wp-block-paragraph\">There are two types of vulnerabilities:<\/p>\n\n\n\n<ul class=\"gutenify-section-6070b120-6c47-11ee-af98-d919ebbe3618 wp-block-list\">\n<li class=\"gutenify-section-606bf630-6c47-11ee-af98-d919ebbe3618\">Your site contains a script (WordPress, plugin, theme) with a known vulnerability that has not been corrected by the developers. Development of this script may have been abandoned. In this case, you should disable the script or replace it with a non-vulnerable script that is better monitored by its developers.<\/li>\n\n\n\n<li class=\"gutenify-section-606e4020-6c47-11ee-af98-d919ebbe3618\">Your site is out of date. You haven't corrected the security flaw. You need to update your site as regularly as possible, and make sure you don't have any obsolete scripts (which could potentially put you in the same situation down the line).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading gutenify-section-99dbc780-6c13-11ee-af98-d919ebbe3618\">Zero-day vulnerabilities<\/h3>\n\n\n\n<p class=\"gutenify-section-f327c280-6c40-11ee-af98-d919ebbe3618 wp-block-paragraph\">Sometimes, hackers will find a vulnerability before it is revealed and then corrected. They will exploit it directly. This is known as a zero-day vulnerability.<\/p>\n\n\n\n<p class=\"gutenify-section-36c7c650-6c11-11ee-af98-d919ebbe3618 wp-block-paragraph\">The more popular a script is, the more likely it is that hackers will look for zero-day vulnerabilities in it. It's rare, but it happens.<br>Here's another reason to design simple sites: the more popular plugins you multiply, the more vulnerable your WordPress site becomes. Not just to zero-day vulnerabilities, but to vulnerabilities in general.<\/p>\n\n\n\n<p class=\"gutenify-section-e5adcdf0-6c15-11ee-af98-d919ebbe3618 wp-block-paragraph\">To protect against 0-day vulnerabilities, the server hosting your site needs to be secure. This can be achieved by blocking suspicious requests from hackers using an application firewall. Then block attacking IPs with fail2ban, for example. This is not generally the case with shared hosting packages. With the exception of<a href=\"https:\/\/www.haisoft.fr\" target=\"_blank\" rel=\"noopener\" title=\"\">HaiSoft<\/a> with whom I've pushed these security measures, which has greatly reduced the number of hacks. But this can lead to false positives: Requests blocked when they are legitimate, especially with WordPress builders (Elementor, Divi, WP-Bakery and others). The technical support required is then higher, which is why most service providers don't implement this type of security. Security is always more complex than no security.<\/p>\n\n\n\n<p class=\"gutenify-section-c42b92f0-6c44-11ee-af98-d919ebbe3618 wp-block-paragraph\">Despite all the security measures in place, it's important to bear in mind that some hacker requests can slip through the net. There is no such thing as zero risk, and anyone who claims otherwise is either ignorant or a liar.<\/p>\n\n\n\n<p class=\"gutenify-section-5dffca70-6c42-11ee-af98-d919ebbe3618 wp-block-paragraph\">So, since perfect security doesn't exist, assume that your site could be hacked tomorrow. If this happens, what do you do? You'd better have an up-to-date, easily restorable backup that's not stored on your site.<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading gutenify-section-2dfae4d0-6c43-11ee-af98-d919ebbe3618\">Conclusion<\/h2>\n\n\n\n<p class=\"gutenify-section-2f250cf0-6c43-11ee-af98-d919ebbe3618 wp-block-paragraph\">Hacking doesn't just happen to other people. On a regular basis, owners of WordPress sites come to me with a problem. <a href=\"\/en\/services\/repairing-and-securing-pirated-wordpress-sites\/\" target=\"_blank\" rel=\"noopener\" title=\"\">hacked website to repair<\/a>.<\/p>\n\n\n\n<p class=\"gutenify-section-36ca4ba0-6c43-11ee-af98-d919ebbe3618 wp-block-paragraph\">Every computer system is potentially vulnerable, including your WordPress site. The challenge is to minimize the risks of hacking by applying all preventive measures. This starts with an up-to-date, secure server capable of blocking attacks. It also means regularly monitoring your WordPress site, updating it as often as possible, constantly checking for known security vulnerabilities, and taking swift action in the event of a problem. In all cases, an automated, external, independent backup of your site must be carried out on a daily basis. This is precisely the set of services you'll find in my <a href=\"\/en\/services\/wordpress-webmastering\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Webmastering WordPress<\/a>.<\/p>\n\n\n\n<p class=\"gutenify-section-7dee6c50-6c43-11ee-af98-d919ebbe3618 wp-block-paragraph\">If your site is important to your business, don't wait to be hacked. Be proactive and have your site checked by a <a href=\"\/en\/services\/wordpress-audit-consulting\/\" target=\"_blank\" rel=\"noopener\" title=\"\">WordPress security audit<\/a> or go directly to my <a href=\"\/en\/services\/wordpress-webmastering\/\" title=\"\">Webmastering<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Beaucoup se demandent comment WordPress peut \u00eatre vuln\u00e9rable aux attaques malgr\u00e9 sa popularit\u00e9 et son suivi. D&rsquo;autres ignorent totalement le risque. Analyse. Qu&rsquo;est-ce qu&rsquo;une vuln\u00e9rabilit\u00e9 ? WordPress est programm\u00e9 avec le langage PHP.Le code PHP permet d&rsquo;obtenir des sites \u00ab\u00a0dynamiques\u00a0\u00bb. C&rsquo;est \u00e0 dire que le contenu est g\u00e9n\u00e9r\u00e9 \u00e0 chaque page par un programme PHP. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3339,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-3179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-securite-wordpress"],"_links":{"self":[{"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/posts\/3179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/comments?post=3179"}],"version-history":[{"count":33,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/posts\/3179\/revisions"}],"predecessor-version":[{"id":3371,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/posts\/3179\/revisions\/3371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/media\/3339"}],"wp:attachment":[{"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/media?parent=3179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/categories?post=3179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive-www.lrob.fr\/en\/wp-json\/wp\/v2\/tags?post=3179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}