' . "\n";
109 | $message .= '
| ' . "\n";
154 | $message .= ' ' . "\n"; 155 | $message .= ' |
├── .github
└── workflows
│ └── amplify.yml
├── .wordpress-org
├── banner-1544x500.png
├── banner-772x250.png
├── icon-128x128.png
├── icon-256x256.png
├── screenshot-1.png
├── screenshot-2.png
└── screenshot-3.png
├── assets
├── admin.css
├── banner-1544x500.png
├── banner-772x250.png
├── icon-128x128.png
├── icon-256x256.png
├── icon-apache.svg
├── icon-curl.svg
├── icon-imagemagick.svg
├── icon-mariadb.svg
├── icon-memcached.svg
├── icon-mysql.svg
├── icon-nginx.svg
├── icon-php.svg
├── icon-plugin.svg
├── icon-redis.svg
├── icon-sqlite.svg
├── icon-theme.svg
├── icon-wordpress.svg
├── logo16.png
├── logo512.png
├── logo64.png
├── screenshot-1.png
├── screenshot-2.png
└── screenshot-3.png
├── changelog.txt
├── languages
└── wpvulnerability.pot
├── readme.txt
├── wpvulnerability-admin.php
├── wpvulnerability-adminms.php
├── wpvulnerability-api.php
├── wpvulnerability-cli.php
├── wpvulnerability-core.php
├── wpvulnerability-general.php
├── wpvulnerability-notifications.php
├── wpvulnerability-plugins.php
├── wpvulnerability-process.php
├── wpvulnerability-run.php
├── wpvulnerability-schedule.php
├── wpvulnerability-sitehealth.php
├── wpvulnerability-software.php
├── wpvulnerability-themes.php
└── wpvulnerability.php
/.github/workflows/amplify.yml:
--------------------------------------------------------------------------------
1 |
2 | name: Amplify Security
3 | on:
4 | pull_request: {}
5 | workflow_dispatch: {}
6 | push:
7 | branches: ["master", "main"]
8 |
9 | permissions:
10 | contents: read
11 | id-token: write
12 |
13 | jobs:
14 | amplify-security-scan:
15 | name: Amplify Security Scan
16 | runs-on: ubuntu-latest
17 | if: (github.actor != 'dependabot[bot]')
18 | steps:
19 | - name: Checkout
20 | uses: actions/checkout@v4
21 | - name: Amplify Runner
22 | uses: amplify-security/runner-action@v0.1.0
23 |
--------------------------------------------------------------------------------
/.wordpress-org/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/banner-1544x500.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/banner-772x250.png
--------------------------------------------------------------------------------
/.wordpress-org/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/icon-128x128.png
--------------------------------------------------------------------------------
/.wordpress-org/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/icon-256x256.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/screenshot-1.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/screenshot-2.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/.wordpress-org/screenshot-3.png
--------------------------------------------------------------------------------
/assets/admin.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --red-dark: #b32d2e;
3 | --red-mediun: #D54E21;
4 | --red-light: #FAEDE8;
5 | }
6 | .blink {
7 | animation: blinker 2s linear infinite;
8 | }
9 | @keyframes blinker {
10 | 50% {
11 | opacity: 0;
12 | }
13 | }
14 |
15 | /* Admin plugins table styles */
16 |
17 | .plugins-php .vulnerability {
18 | background-color: var(--red-mediun);
19 | padding: 4px;
20 | }
21 | .plugins-php .vulnerability .alert {
22 | color: white;
23 | }
24 | .plugins tr.wpvulnerability td, .plugins tr.wpvulnerability.active td {
25 | background-color: var(--red-light);
26 | }
27 | .plugins tr.wpvulnerability:before {
28 | background-color: var(--red-light);
29 | content: "";
30 | display: table-cell;
31 | }
32 | .plugins tr.wpvulnerability.active::before {
33 | border-left: 4px solid var( --red-mediun );
34 | }
35 | .plugins tr.wpvulnerability p.text-red, .plugins tr.wpvulnerability.active p.text-red {
36 | color: var(--red-mediun)
37 | }
38 |
39 | /* Admin core table styles */
40 |
41 | .update-core-php table.wpvulnerability td {
42 | background-color: var(--red-light);
43 | }
44 | .update-core-php table.wpvulnerability tr:before {
45 | background-color: var(--red-light);
46 | content: "";
47 | display: table-cell;
48 | }
49 | .update-core-php table.wpvulnerability tr.active::before {
50 | border-left: 4px solid var( --red-mediun );
51 | }
52 | .update-core-php p.text-red {
53 | color: var(--red-mediun)
54 | }
55 |
56 | /* Configuration header */
57 |
58 | .wpvulnerability-header {
59 | background-color: #1d73be;
60 | margin-left: -20px;
61 | padding: 20px;
62 | display: flex;
63 | justify-content: space-between;
64 | color: white;
65 | }
66 | .wpvulnerability-header .logo {
67 | min-width: 20%;
68 | }
69 | .wpvulnerability-header h2 {
70 | float: right;
71 | color: white;
72 | padding: 25px 0 0 0;
73 | margin: 0;
74 | }
75 |
76 | /* Configuration flex */
77 |
78 | .wpvulnerability-container {
79 | display: flex;
80 | flex-direction: row;
81 | gap: 20px;
82 | }
83 |
84 | .wpvulnerability-column {
85 | flex: 1;
86 | }
87 |
88 | /* Diseño móvil */
89 | @media (max-width: 1280px) {
90 | .wpvulnerability-container {
91 | flex-direction: column;
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/assets/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/banner-1544x500.png
--------------------------------------------------------------------------------
/assets/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/banner-772x250.png
--------------------------------------------------------------------------------
/assets/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/icon-128x128.png
--------------------------------------------------------------------------------
/assets/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/icon-256x256.png
--------------------------------------------------------------------------------
/assets/icon-apache.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-curl.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icon-mariadb.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icon-memcached.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-mysql.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icon-nginx.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-php.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-plugin.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-redis.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icon-sqlite.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icon-theme.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/icon-wordpress.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/assets/logo16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/logo16.png
--------------------------------------------------------------------------------
/assets/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/logo512.png
--------------------------------------------------------------------------------
/assets/logo64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/logo64.png
--------------------------------------------------------------------------------
/assets/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/screenshot-1.png
--------------------------------------------------------------------------------
/assets/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/screenshot-2.png
--------------------------------------------------------------------------------
/assets/screenshot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/javiercasares/wpvulnerability/41f0f84fb04f96828b1962072ad1d2ac560c0629/assets/screenshot-3.png
--------------------------------------------------------------------------------
/changelog.txt:
--------------------------------------------------------------------------------
1 | == Changelog ==
2 |
3 | = [4.0.4] - 2025-04-07 =
4 |
5 | **Added**
6 |
7 | * Extra sanitizations.
8 |
9 | **Changed**
10 |
11 | * Translation improvements.
12 |
13 | **Fixed**
14 |
15 | * Plugin and translation load.
16 |
17 | **Compatibility**
18 |
19 | * WordPress: 4.1 - 6.8
20 | * PHP: 5.6 - 8.4
21 | * WP-CLI: 2.3.0 - 2.11.0
22 |
23 | **Tests**
24 |
25 | * PHP Coding Standards: 3.12.1
26 | * WordPress Coding Standards: 3.1.0
27 | * Plugin Check (PCP): 1.4.0
28 | * SonarCloud Code Review
29 |
30 | = [4.0.3] - 2024-10-28 =
31 |
32 | * Recreation of the 4.0.2 version. Something did not created the 4.0.2 version.
33 |
34 | = [4.0.2] - 2024-10-25 =
35 |
36 | **Fixed**
37 |
38 | * ImageMagick: it crashes in some cases where the hosting does not have ImageMagick.
39 |
40 | **Compatibility**
41 |
42 | * WordPress: 4.1 - 6.7
43 | * PHP: 5.6 - 8.4
44 | * WP-CLI: 2.3.0 - 2.11.0
45 |
46 | **Tests**
47 |
48 | * PHP Coding Standards: 3.10.3
49 | * WordPress Coding Standards: 3.1.0
50 | * Plugin Check (PCP): 1.1.0
51 | * SonarCloud Code Review
52 |
53 | = [4.0.1] - 2024-10-04 =
54 |
55 | **Fixed**
56 |
57 | * API endpoints: some API endpoints were failing.
58 | * CLI endpoints: some CLI endpoints were failing.
59 |
60 | **Compatibility**
61 |
62 | * WordPress: 4.1 - 6.7
63 | * PHP: 5.6 - 8.4
64 | * WP-CLI: 2.3.0 - 2.11.0
65 |
66 | **Tests**
67 |
68 | * PHP Coding Standards: 3.10.3
69 | * WordPress Coding Standards: 3.1.0
70 | * Plugin Check (PCP): 1.1.0
71 | * SonarCloud Code Review
72 |
73 | = [4.0.0] - 2024-10-01 =
74 |
75 | **Added**
76 |
77 | * ImageMagic vulnerabilities (Site Health + WP-CLI + API + mail).
78 | * curl vulnerabilities (Site Health + WP-CLI + API + mail).
79 | * memcached vulnerabilities (Site Health + WP-CLI + API + mail).
80 | * Redis vulnerabilities (Site Health + WP-CLI + API + mail).
81 | * SQLite vulnerabilities (Site Health + WP-CLI + API + mail).
82 |
83 | **Fixed**
84 |
85 | * Test email without email.
86 | * Improved MariaDB 11.x detection.
87 | * Improved versions detection (major-minor.patch-build).
88 | * WordPress < 5.3: use of wp_date().
89 | * WordPress < 5.0: locale detection.
90 | * Dashboard widget only for users with capabilities.
91 | * WordPress < 5.2: link to Site Health
92 |
93 | **Changed**
94 |
95 | * Big refactory.
96 | * Less files, less size, improved code quality.
97 |
98 | **Compatibility**
99 |
100 | * WordPress: 4.1 - 6.7
101 | * PHP: 5.6 - 8.4
102 | * WP-CLI: 2.3.0 - 2.11.0
103 |
104 | **Tests**
105 |
106 | * Manual Testing:
107 | * WordPress 6.7 / PHP 8.4
108 | * WordPress 6.6 / PHP 8.3
109 | * WordPress 6.4 / PHP 8.2
110 | * WordPress 6.1 / PHP 8.1
111 | * WordPress 5.8 / PHP 8.0
112 | * WordPress 5.5 / PHP 7.4
113 | * WordPress 5.3 / PHP 7.3
114 | * WordPress 4.9 / PHP 7.2
115 | * WordPress 4.8 / PHP 7.1
116 | * WordPress 4.6 / PHP 7.0
117 | * WordPress 4.1 / PHP 5.6
118 | * PHP Coding Standards: 3.10.3
119 | * WordPress Coding Standards: 3.1.0
120 | * Plugin Check (PCP): 1.1.0
121 | * SonarCloud Code Review
122 |
123 | = [3.4.1] - 2024-08-23 =
124 |
125 | **Fixed**
126 |
127 | * The number of vulnerabilities for core is incorrect.
128 |
129 | **Compatibility**
130 |
131 | * WordPress: 4.1 - 6.7
132 | * PHP: 5.6 - 8.3
133 | * WP-CLI: 2.3.0 - 2.11.0
134 |
135 | **Tests**
136 |
137 | * PHP Coding Standards: 3.10.2
138 | * WordPress Coding Standards: 3.1.0
139 | * Plugin Check (PCP): 1.0.2
140 | * SonarCloud Code Review
141 |
142 | = [3.4.0] - 2024-08-16 =
143 |
144 | **Added**
145 |
146 | * New checks for MariaDB vulnerabilities.
147 | * New checks for MySQL vulnerabilities.
148 | * WPVulnerability statistics in the configuration page.
149 | * WPVulnerability contributors in the configuration page.
150 |
151 | **Changed**
152 |
153 | * Code improvement.
154 | * Better UI for the configuration page.
155 | * Web server version detection improved.
156 |
157 | **Fixed**
158 |
159 | * Get the statistics information the right way.
160 |
161 | **Compatibility**
162 |
163 | * WordPress: 4.1 - 6.7
164 | * PHP: 5.6 - 8.3
165 | * WP-CLI: 2.3.0 - 2.11.0
166 |
167 | **Tests**
168 |
169 | * PHP Coding Standards: 3.10.2
170 | * WordPress Coding Standards: 3.1.0
171 | * Plugin Check (PCP): 1.0.2
172 | * SonarCloud Code Review
173 |
174 | = [3.3.5] - 2024-08-14 =
175 |
176 | **Added**
177 |
178 | * Add counters for Core, Plugins, and Themes.
179 | * Add a Vulnerabilities filter in the Plugin list (WordPress and WordPress Multisite).
180 | * Add a Vulnerabilities filter in the Themes list (WordPress Multisite).
181 |
182 | **Compatibility**
183 |
184 | * WordPress: 4.1 - 6.7
185 | * PHP: 5.6 - 8.3
186 | * WP-CLI: 2.3.0 - 2.11.0
187 |
188 | **Tests**
189 |
190 | * PHP Coding Standards: 3.10.2
191 | * WordPress Coding Standards: 3.1.0
192 | * Plugin Check (PCP): 1.0.2
193 | * SonarCloud Code Review
194 |
195 | = [3.3.4] - 2024-08-12 =
196 |
197 | **Fixed**
198 |
199 | * The "Last updated on" column in the plugin list is available again.
200 |
201 | **Compatibility**
202 |
203 | * WordPress: 4.1 - 6.7
204 | * PHP: 5.6 - 8.3
205 | * WP-CLI: 2.3.0 - 2.11.0
206 |
207 | **Tests**
208 |
209 | * PHP Coding Standards: 3.10.2
210 | * WordPress Coding Standards: 3.1.0
211 | * Plugin Check (PCP): 1.0.2
212 | * SonarCloud Code Review
213 |
214 | = [3.3.3] - 2024-08-05 =
215 |
216 | **Fixed**
217 |
218 | * The Dashboard panel is availbale, again.
219 |
220 | **Compatibility**
221 |
222 | * WordPress: 4.1 - 6.7
223 | * PHP: 5.6 - 8.3
224 | * WP-CLI: 2.3.0 - 2.10.0
225 |
226 | **Tests**
227 |
228 | * PHP Coding Standards: 3.10.2
229 | * WordPress Coding Standards: 3.1.0
230 | * Plugin Check (PCP): 1.0.2
231 | * SonarCloud Code Review
232 |
233 | = [3.3.1] - 2024-08-02 =
234 |
235 | **Fixed**
236 |
237 | * Delete the wp_is_rest_endpoint check. Does not need it.
238 |
239 | **Compatibility**
240 |
241 | * WordPress: 4.1 - 6.7
242 | * PHP: 5.6 - 8.3
243 | * WP-CLI: 2.3.0 - 2.10.0
244 |
245 | **Tests**
246 |
247 | * PHP Coding Standards: 3.10.2
248 | * WordPress Coding Standards: 3.1.0
249 | * Plugin Check (PCP): 1.0.2
250 | * SonarCloud Code Review
251 |
252 | = [3.3.0] - 2024-08-02 =
253 |
254 | **Added**
255 |
256 | * Ability to exclude of vulnerability types at a global level.
257 | * WP-CLI commands formats (--format=[table,json]).
258 | * REST API endpoints (requires Application Password).
259 |
260 | **Changed**
261 |
262 | * README file.
263 |
264 | **Compatibility**
265 |
266 | * WordPress: 4.1 - 6.7
267 | * PHP: 5.6 - 8.3
268 | * WP-CLI: 2.3.0 - 2.10.0
269 |
270 | **Tests**
271 |
272 | * PHP Coding Standards: 3.10.2
273 | * WordPress Coding Standards: 3.1.0
274 | * Plugin Check (PCP): 1.0.2
275 | * SonarCloud Code Review
276 |
277 | = [3.2.2] - 2024-07-27 =
278 |
279 | **Added**
280 |
281 | * Ability to configure a different From: email address for sending vulnerability notifications via `wp-config.php`.
282 |
283 | **Changed**
284 |
285 | * The URL for the website now uses its own domain name.
286 | * Dashboard visibility is restricted to users with specific capabilities, similar to Site Health.
287 |
288 | **Fixed**
289 |
290 | * Various minor fixes to prevent warnings and potential errors due to misconfigured WordPress setups.
291 | * Allow loading of some necessary libraries.
292 |
293 | **Compatibility**
294 |
295 | * WordPress: 4.1 - 6.6
296 | * PHP: 5.6 - 8.3
297 | * WP-CLI: 2.3.0 - 2.10.0
298 |
299 | **Tests**
300 |
301 | * WordPress Coding Standards: 3.1.0
302 | * Plugin Check (PCP): 1.0.2
303 | * SonarCloud Code Review
304 |
305 | = [3.2.0] - 2024-05-08 =
306 |
307 | **Added**
308 |
309 | * Apache HTTPD vulnerabilities (Site Health).
310 | * nginx vulnerabilities (Site Health).
311 |
312 | **Changed**
313 |
314 | * License updated to GPL 2.0 or later.
315 |
316 | **Compatibility**
317 |
318 | * WordPress 4.1 - WordPress 6.6.
319 | * PHP 5.6 - PHP 8.3.
320 | * WordPress Coding Standards 3.1.0.
321 | * WP-CLI 2.3.0 - WP-CLI 2.10.0.
322 | * Plugin Check (PCP)
323 |
324 | = [3.1.2] - 2024-05-08 =
325 |
326 | **Fixed**
327 |
328 | * In some cases (when calling it directly, or wget), the cron was not working and gave an error.
329 | * The license had a non-compliance ID. Now, same license but working.
330 | * General improvements.
331 |
332 | **Changed**
333 |
334 | * The URL from the API is using its own domain name.
335 |
336 | **Compatibility**
337 |
338 | * WordPress 4.1 - WordPress 6.6.
339 | * PHP 5.6 - PHP 8.3.
340 | * WordPress Coding Standards 3.1.0.
341 | * WP-CLI 2.3.0 - WP-CLI 2.10.0.
342 | * Plugin Check (PCP)
343 |
344 | = [3.1.1] - 2024-02-11 =
345 |
346 | **Fixed**
347 |
348 | * Fixes some possible PHP warnings when retrieving data from the API.
349 | * Delete old schedules when unistalling the plugin.
350 | * Fix how is printed the High severity.
351 |
352 | **Deleted**
353 |
354 | * The plugin will not show the Exploitability information.
355 |
356 | **Compatibility**
357 |
358 | * Compatibility: WordPress 4.1 - WordPress 6.5.
359 | * Compatibility: PHP 5.6 - PHP 8.3.
360 | * Compatibility: WordPress Coding Standards 3.0.1.
361 | * Compatibility: WP-CLI 2.3.0 - WP-CLI 2.10.0.
362 |
363 | = [3.1.0] - 2024-02-04 =
364 |
365 | **Added**
366 |
367 | * A new column in the plugin list, with the last updated day (and diff).
368 | * A notice if the plugin is closed in the WordPress.org repo.
369 |
370 | **Fixed**
371 |
372 | * Fixes the schedule in some cases.
373 | * Fixes the PHP format (using always the n.n / n.n.n format).
374 |
375 | **Compatibility**
376 |
377 | * Compatibility: WordPress 4.1 - WordPress 6.5.
378 | * Compatibility: PHP 5.6 - PHP 8.3.
379 | * Compatibility: WordPress Coding Standards 3.0.1.
380 | * Compatibility: WP-CLI 2.3.0 - WP-CLI 2.9.0.
381 |
382 | = [3.0.2] - 2024-01-27 =
383 |
384 | **Fixed**
385 |
386 | * Fixes the WordPress Multisite saving options.
387 |
388 | **Compatibility**
389 |
390 | * Compatibility: WordPress 4.1 - WordPress 6.5.
391 | * Compatibility: PHP 5.6 - PHP 8.3.
392 | * Compatibility: WordPress Coding Standards 3.0.1.
393 | * Compatibility: WP-CLI 2.3.0 - WP-CLI 2.9.0.
394 |
395 | = [3.0.1] - 2023-12-19 =
396 |
397 | **Fixed**
398 |
399 | * Test email with the actual vulnerabilities (or a test message), now forced when the button is clicked.
400 | * Fixed some strings (thanks @alexclassroom).
401 | * WordPress Coding Standards 3.0.1 up-to-date.
402 |
403 | **Compatibility**
404 |
405 | * Compatibility: WordPress 4.1 - WordPress 6.4.
406 | * Compatibility: PHP 5.6 - PHP 8.3.
407 | * Compatibility: WordPress Coding Standards 3.0.1.
408 | * Compatibility: WP-CLI 2.3.0 - WP-CLI 2.9.0.
409 |
410 | = [3.0.0] - 2023-12-09 =
411 |
412 | **Added**
413 |
414 | * WordPress Multisite support.
415 | * PHP vulnerabilities (Site Health).
416 | * Reload the data from source.
417 | * Test email with the actual vulnerabilities.
418 |
419 | **Changed**
420 |
421 | * Loading the data in better way.
422 |
423 | **Compatibility**
424 |
425 | * Compatibility: WordPress 4.1 - WordPress 6.4.
426 | * Compatibility: PHP 5.6 - PHP 8.3.
427 | * Compatibility: WordPress Coding Standards 3.0.1.
428 | * Compatibility: WP-CLI 2.3 - WP-CLI 2.9.0.
429 |
430 | = [2.2.1] - 2023-10-02 =
431 |
432 | **Added**
433 |
434 | * New security information (at WordPress.org plugin page).
435 | * New privacy information (at WordPress.org plugin page).
436 | * New compatibility information (at WordPress.org plugin page).
437 | * New vulnerabilities information (at WordPress.org plugin page).
438 | * New profiling information (at WordPress.org plugin page).
439 |
440 | **Changed**
441 |
442 | * Promoted dashboard.
443 | * Performance improvement: only load the plugin in the admin area.
444 |
445 | **Compatibility**
446 |
447 | * Compatibility: WordPress 4.1 - WordPress 6.4.
448 | * Compatibility: PHP 5.6 - PHP 8.3.
449 | * Compatibility: WordPress Coding Standards 3.0.1.
450 | * Compatibility: WP-CLI 2.3 - WP-CLI 2.8.1.
451 |
452 | = [2.2.0] - 2023-09-14 =
453 |
454 | **Added**
455 |
456 | * New Dashboard, with a Vulnerability summary and products affected.
457 |
458 | **Compatibility**
459 |
460 | * Compatibility: WordPress 4.1 - WordPress 6.3.
461 | * Compatibility: PHP 5.6 - PHP 8.3.
462 | * Compatibility: WordPress Coding Standards 3.0.0.
463 | * Compatibility: WP-CLI 2.3 - WP-CLI 2.8.
464 |
465 | = [2.1.0] - 2023-09-11 =
466 |
467 | **Changed**
468 |
469 | * Improved detection of plugins folders. This shpould reduce the false positives in some plugins, and Pro/Premium plugins.
470 |
471 | **Compatibility**
472 |
473 | * Compatibility: WordPress 4.1 - WordPress 6.3.
474 | * Compatibility: PHP 5.6 - PHP 8.3.
475 | * Compatibility: WordPress Coding Standards 3.0.0.
476 | * Compatibility: WP-CLI 2.3 - WP-CLI 2.7.
477 |
478 | = [2.0.4] - 2023-09-10 =
479 |
480 | **Compatibility**
481 |
482 | * WordPress Coding Standards 3.0.0 compatible.
483 |
484 | = [2.0.3] - 2023-07-27 =
485 |
486 | **Added**
487 |
488 | * Validate secure requests to the API.
489 |
490 | **Changed**
491 |
492 | * Reduce API timeout request time from 10.0 seconds to 2.5 seconds.
493 |
494 | **Compatibility**
495 |
496 | * Compatibility: WordPress 4.1 - WordPress 6.3.
497 | * Compatibility: PHP 5.6 - PHP 8.3.
498 |
499 | = [2.0.2] - 2023-04-24 =
500 |
501 | **Fixed**
502 |
503 | * Fix the Notification system.
504 |
505 | = [2.0.1] - 2023-04-20 =
506 |
507 | **Added**
508 |
509 | * Added new options to cache the vulnerability counter.
510 |
511 | **Changed**
512 |
513 | * Update the readme.txt.
514 |
515 | **Fixed**
516 |
517 | * Fix the Site Health messages.
518 |
519 | = [2.0.0] - 2023-04-15 =
520 |
521 | **Added**
522 |
523 | * If the WordPress version supports it, vulnerabilities are displayed in the Core update screen.
524 | * Calls can be made from WP-CLI `wp help wpvulnerability` to list vulnerabilities in Core `wp wpvulnerability core`, Plugins `wp wpvulnerability plugins` and Themes `wp wpvulnerability themes`. Before only Plugins.
525 | * Site Health shows core vulnerabilities, which were not previously shown.
526 |
527 | **Changed**
528 |
529 | * The plugin has been completely refactored.
530 |
531 | **Compatibility**
532 |
533 | * Compatibility: WordPress 4.1 - WordPress 6.2
534 | * Compatibility: PHP 5.6 - PHP 8.2
535 | * Compatibility: WP-CLI 2.3 - 2.7
536 |
537 | = [1.3.2] - 2023-03-22 =
538 |
539 | **Changed**
540 |
541 | * Code security improvements
542 |
543 | **Fixed**
544 |
545 | * Fix some PHP errors
546 |
547 | = [1.3.2] - 2023-03-22 =
548 |
549 | **Changed**
550 |
551 | * Code security improvements
552 |
553 | **Fixed**
554 |
555 | * Fix some PHP errors
556 |
557 | = [1.3.1] - 2023-02-27 =
558 |
559 | **Changed**
560 |
561 | * Code security improvements
562 | * Fix the Severity value
563 | * A better Site Health information
564 |
565 | **Compatibility**
566 |
567 | * Compatibility: WordPress 5.2 - WordPress 6.2
568 | * Compatibility: PHP 7.2 - PHP 8.1
569 |
570 | = [1.3.0] - 2023-02-27 =
571 |
572 | **Added**
573 |
574 | * Information, when available, about the vulnerability, in a simplified way. Only in the plugin list.
575 | * Information, when available, about the potential severity and exploitability. Only in the plugin list.
576 | * Links to sources to get additional information. Only in the plugin list.
577 |
578 | **Changed**
579 |
580 | * Improved security in code.
581 |
582 | = [1.2.4] - 2023-02-20 =
583 |
584 | **Compatibility**
585 |
586 | * Compatibility: WordPress 5.2 - WordPress 6.2
587 | * Compatibility: PHP 7.2 - PHP 8.1
588 |
589 | = [1.2.3] - 2023-01-30 =
590 |
591 | **Fixed**
592 |
593 | * Fix WP_Error object.
594 |
595 | = [1.2.2] - 2023-01-30 =
596 |
597 | **Fixed**
598 |
599 | * Fix WP_Error object.
600 |
601 | = [1.2.1] - 2023-01-09 =
602 |
603 | **Fixed**
604 |
605 | * Some fixed to improve the operators.
606 |
607 | = [1.2.0] - 2022-12-15 =
608 |
609 | **Added**
610 |
611 | * Sends email periodically. You can choose who is going to receive the emails.
612 | * First approach to WPCLI Commands (thanks to @lbonomo).
613 |
614 | = [1.1.0] - 2022-05-18 =
615 |
616 | **Fixed**
617 |
618 | * Fix: Prevents text domain not given correctly.
619 | * Fix: strings not translated.
620 |
621 | = [1.0.1] - 2022-05-17 =
622 |
623 | **Fixed**
624 |
625 | * Fix: strings not translated.
626 |
627 | = [1.0.0] - 2022-05-16 =
628 |
629 | **Added**
630 |
631 | * Added tabs in Health check.
632 |
633 | = [0.2.0] - 2022-05-07 =
634 |
635 | **Added**
636 |
637 | * Improved the information in plugins list.
638 |
639 | = [0.1.0] - 2022-05-06 =
640 |
641 | **Added**
642 |
643 | * Notification in the plugins list.
644 | * First release.
--------------------------------------------------------------------------------
/languages/wpvulnerability.pot:
--------------------------------------------------------------------------------
1 | #, fuzzy
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: WPVulnerability\n"
5 | "POT-Creation-Date: 2024-10-01 19:01+0200\n"
6 | "PO-Revision-Date: 2023-09-12 06:56+0200\n"
7 | "Last-Translator: \n"
8 | "Language-Team: \n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
13 | "X-Generator: Poedit 3.4.4\n"
14 | "X-Poedit-Basepath: ..\n"
15 | "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
16 | "X-Poedit-WPHeader: wpvulnerability.php\n"
17 | "X-Poedit-SourceCharset: UTF-8\n"
18 | "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
19 | "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
20 | "_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
21 | "X-Poedit-SearchPath-0: .\n"
22 | "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23 |
24 | #: wpvulnerability-admin.php:54 wpvulnerability-adminms.php:236
25 | msgid "Data from source has been reloaded."
26 | msgstr ""
27 |
28 | #: wpvulnerability-admin.php:80 wpvulnerability-adminms.php:261
29 | msgid "Test email has been sent."
30 | msgstr ""
31 |
32 | #: wpvulnerability-admin.php:82 wpvulnerability-adminms.php:265
33 | msgid "Test email has failed. Please, check your email settings."
34 | msgstr ""
35 |
36 | #: wpvulnerability-admin.php:103 wpvulnerability-adminms.php:277
37 | msgid "WPVulnerability settings"
38 | msgstr ""
39 |
40 | #: wpvulnerability-admin.php:146 wpvulnerability-adminms.php:331
41 | msgid "Reload the data from source"
42 | msgstr ""
43 |
44 | #: wpvulnerability-admin.php:149 wpvulnerability-adminms.php:334
45 | msgid ""
46 | "Reload all Core, Plugins, Themes and other components information directly "
47 | "from the API to have updated data."
48 | msgstr ""
49 |
50 | #: wpvulnerability-admin.php:152 wpvulnerability-adminms.php:337
51 | msgid "Reload Data"
52 | msgstr ""
53 |
54 | #: wpvulnerability-admin.php:158 wpvulnerability-adminms.php:344
55 | msgid "Email test"
56 | msgstr ""
57 |
58 | #: wpvulnerability-admin.php:167 wpvulnerability-adminms.php:353
59 | msgid "The mail will be sent from (set on WPVULNERABILITY_MAIL): "
60 | msgstr ""
61 |
62 | #: wpvulnerability-admin.php:174 wpvulnerability-adminms.php:360
63 | msgid "The mail will be sent from: "
64 | msgstr ""
65 |
66 | #: wpvulnerability-admin.php:178 wpvulnerability-adminms.php:364
67 | msgid "Send an email with the vulnerabilities (or empty)."
68 | msgstr ""
69 |
70 | #: wpvulnerability-admin.php:181 wpvulnerability-adminms.php:367
71 | msgid "Send email"
72 | msgstr ""
73 |
74 | #: wpvulnerability-admin.php:192 wpvulnerability-adminms.php:377
75 | msgid "WPVulnerability Statistics"
76 | msgstr ""
77 |
78 | #: wpvulnerability-admin.php:198 wpvulnerability-admin.php:703
79 | #: wpvulnerability-adminms.php:383 wpvulnerability-adminms.php:881
80 | msgid "Plugins"
81 | msgstr ""
82 |
83 | #. translators: number of vulnerabilities.
84 | #: wpvulnerability-admin.php:206 wpvulnerability-admin.php:232
85 | #: wpvulnerability-admin.php:258 wpvulnerability-admin.php:278
86 | #: wpvulnerability-admin.php:298 wpvulnerability-admin.php:318
87 | #: wpvulnerability-admin.php:342 wpvulnerability-admin.php:362
88 | #: wpvulnerability-admin.php:382 wpvulnerability-admin.php:402
89 | #: wpvulnerability-admin.php:422 wpvulnerability-admin.php:442
90 | #: wpvulnerability-adminms.php:392 wpvulnerability-adminms.php:418
91 | #: wpvulnerability-adminms.php:444 wpvulnerability-adminms.php:464
92 | #: wpvulnerability-adminms.php:484 wpvulnerability-adminms.php:504
93 | #: wpvulnerability-adminms.php:528 wpvulnerability-adminms.php:548
94 | #: wpvulnerability-adminms.php:568 wpvulnerability-adminms.php:588
95 | #: wpvulnerability-adminms.php:608 wpvulnerability-adminms.php:628
96 | #, php-format
97 | msgid "%s vulnerability"
98 | msgid_plural "%s vulnerabilities"
99 | msgstr[0] ""
100 | msgstr[1] ""
101 |
102 | #. translators: number of plugins.
103 | #: wpvulnerability-admin.php:212 wpvulnerability-adminms.php:398
104 | #, php-format
105 | msgid " (%s plugin)"
106 | msgid_plural " (%s plugins)"
107 | msgstr[0] ""
108 | msgstr[1] ""
109 |
110 | #: wpvulnerability-admin.php:220 wpvulnerability-admin.php:246
111 | #: wpvulnerability-admin.php:266 wpvulnerability-admin.php:286
112 | #: wpvulnerability-admin.php:306 wpvulnerability-admin.php:326
113 | #: wpvulnerability-admin.php:350 wpvulnerability-admin.php:370
114 | #: wpvulnerability-admin.php:390 wpvulnerability-admin.php:410
115 | #: wpvulnerability-admin.php:430 wpvulnerability-admin.php:450
116 | #: wpvulnerability-admin.php:497 wpvulnerability-admin.php:513
117 | #: wpvulnerability-adminms.php:406 wpvulnerability-adminms.php:432
118 | #: wpvulnerability-adminms.php:452 wpvulnerability-adminms.php:472
119 | #: wpvulnerability-adminms.php:492 wpvulnerability-adminms.php:512
120 | #: wpvulnerability-adminms.php:536 wpvulnerability-adminms.php:556
121 | #: wpvulnerability-adminms.php:576 wpvulnerability-adminms.php:596
122 | #: wpvulnerability-adminms.php:616 wpvulnerability-adminms.php:636
123 | #: wpvulnerability-adminms.php:682 wpvulnerability-adminms.php:699
124 | msgid "Data not available."
125 | msgstr ""
126 |
127 | #: wpvulnerability-admin.php:224 wpvulnerability-admin.php:708
128 | #: wpvulnerability-adminms.php:410 wpvulnerability-adminms.php:886
129 | msgid "Themes"
130 | msgstr ""
131 |
132 | #. translators: number of themes.
133 | #: wpvulnerability-admin.php:238 wpvulnerability-adminms.php:424
134 | #, php-format
135 | msgid " (%s theme)"
136 | msgid_plural " (%s themes)"
137 | msgstr[0] ""
138 | msgstr[1] ""
139 |
140 | #: wpvulnerability-admin.php:250 wpvulnerability-admin.php:713
141 | #: wpvulnerability-adminms.php:436 wpvulnerability-adminms.php:891
142 | #: wpvulnerability-sitehealth.php:178
143 | msgid "PHP"
144 | msgstr ""
145 |
146 | #: wpvulnerability-admin.php:270 wpvulnerability-admin.php:718
147 | #: wpvulnerability-adminms.php:456 wpvulnerability-adminms.php:896
148 | #: wpvulnerability-sitehealth.php:179
149 | msgid "Apache HTTPD"
150 | msgstr ""
151 |
152 | #: wpvulnerability-admin.php:290 wpvulnerability-admin.php:723
153 | #: wpvulnerability-adminms.php:476 wpvulnerability-adminms.php:901
154 | msgid "nginx"
155 | msgstr ""
156 |
157 | #: wpvulnerability-admin.php:310 wpvulnerability-admin.php:728
158 | #: wpvulnerability-adminms.php:496 wpvulnerability-adminms.php:906
159 | #: wpvulnerability-sitehealth.php:181
160 | msgid "MariaDB"
161 | msgstr ""
162 |
163 | #: wpvulnerability-admin.php:334 wpvulnerability-admin.php:733
164 | #: wpvulnerability-adminms.php:520 wpvulnerability-adminms.php:911
165 | #: wpvulnerability-sitehealth.php:182
166 | msgid "MySQL"
167 | msgstr ""
168 |
169 | #: wpvulnerability-admin.php:354 wpvulnerability-admin.php:738
170 | #: wpvulnerability-adminms.php:540 wpvulnerability-adminms.php:916
171 | #: wpvulnerability-sitehealth.php:183
172 | msgid "ImageMagick"
173 | msgstr ""
174 |
175 | #: wpvulnerability-admin.php:374 wpvulnerability-admin.php:743
176 | #: wpvulnerability-adminms.php:560 wpvulnerability-adminms.php:921
177 | #: wpvulnerability-sitehealth.php:184
178 | msgid "curl"
179 | msgstr ""
180 |
181 | #: wpvulnerability-admin.php:394 wpvulnerability-admin.php:749
182 | #: wpvulnerability-adminms.php:580 wpvulnerability-adminms.php:926
183 | msgid "memcached"
184 | msgstr ""
185 |
186 | #: wpvulnerability-admin.php:414 wpvulnerability-admin.php:754
187 | #: wpvulnerability-adminms.php:600 wpvulnerability-adminms.php:931
188 | msgid "Redis"
189 | msgstr ""
190 |
191 | #: wpvulnerability-admin.php:434 wpvulnerability-admin.php:759
192 | #: wpvulnerability-adminms.php:620 wpvulnerability-adminms.php:936
193 | msgid "SQLite"
194 | msgstr ""
195 |
196 | #. translators: date of last update.
197 | #: wpvulnerability-admin.php:469 wpvulnerability-adminms.php:655
198 | #, php-format
199 | msgid "Updated: %s"
200 | msgstr ""
201 |
202 | #: wpvulnerability-admin.php:482 wpvulnerability-adminms.php:668
203 | msgid "Behind the Project"
204 | msgstr ""
205 |
206 | #: wpvulnerability-admin.php:487 wpvulnerability-adminms.php:672
207 | msgid "Sponsors"
208 | msgstr ""
209 |
210 | #: wpvulnerability-admin.php:503 wpvulnerability-adminms.php:689
211 | msgid "Contributors"
212 | msgstr ""
213 |
214 | #. Plugin Name of the plugin/theme
215 | #: wpvulnerability-admin.php:539 wpvulnerability-admin.php:540
216 | #: wpvulnerability-adminms.php:723 wpvulnerability-adminms.php:724
217 | msgid "WPVulnerability"
218 | msgstr ""
219 |
220 | #: wpvulnerability-admin.php:558 wpvulnerability-adminms.php:741
221 | msgid "Configure and save these settings to receive email notifications."
222 | msgstr ""
223 |
224 | #: wpvulnerability-admin.php:571 wpvulnerability-adminms.php:783
225 | msgid "Configure and save these settings to hide vulnerabilities."
226 | msgstr ""
227 |
228 | #: wpvulnerability-admin.php:599 wpvulnerability-adminms.php:768
229 | msgid "Default administrator email"
230 | msgstr ""
231 |
232 | #: wpvulnerability-admin.php:627 wpvulnerability-adminms.php:807
233 | msgid "Daily"
234 | msgstr ""
235 |
236 | #: wpvulnerability-admin.php:632 wpvulnerability-adminms.php:812
237 | msgid "Weekly"
238 | msgstr ""
239 |
240 | #: wpvulnerability-admin.php:698 wpvulnerability-adminms.php:876
241 | msgid "Core"
242 | msgstr ""
243 |
244 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
245 | #: wpvulnerability-admin.php:870 wpvulnerability-adminms.php:956
246 | #, php-format
247 | msgid "Core: %d vulnerability"
248 | msgid_plural "Core: %d vulnerabilities"
249 | msgstr[0] ""
250 | msgstr[1] ""
251 |
252 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
253 | #: wpvulnerability-admin.php:878 wpvulnerability-adminms.php:964
254 | #, php-format
255 | msgid "Themes: %d vulnerability"
256 | msgid_plural "Themes: %d vulnerabilities"
257 | msgstr[0] ""
258 | msgstr[1] ""
259 |
260 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
261 | #: wpvulnerability-admin.php:886 wpvulnerability-adminms.php:972
262 | #, php-format
263 | msgid "Plugins: %d vulnerability"
264 | msgid_plural "Plugins: %d vulnerabilities"
265 | msgstr[0] ""
266 | msgstr[1] ""
267 |
268 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
269 | #: wpvulnerability-admin.php:895 wpvulnerability-adminms.php:981
270 | #, php-format
271 | msgid "PHP %s: "
272 | msgstr ""
273 |
274 | #: wpvulnerability-admin.php:895 wpvulnerability-admin.php:911
275 | #: wpvulnerability-admin.php:928 wpvulnerability-admin.php:945
276 | #: wpvulnerability-admin.php:962 wpvulnerability-admin.php:977
277 | #: wpvulnerability-admin.php:992 wpvulnerability-admin.php:1007
278 | #: wpvulnerability-admin.php:1022 wpvulnerability-admin.php:1037
279 | #: wpvulnerability-adminms.php:981 wpvulnerability-adminms.php:997
280 | #: wpvulnerability-adminms.php:1014 wpvulnerability-adminms.php:1031
281 | #: wpvulnerability-adminms.php:1048 wpvulnerability-adminms.php:1063
282 | #: wpvulnerability-adminms.php:1078 wpvulnerability-adminms.php:1093
283 | #: wpvulnerability-adminms.php:1108 wpvulnerability-adminms.php:1123
284 | #, php-format
285 | msgid "%d vulnerability"
286 | msgid_plural "%d vulnerabilities"
287 | msgstr[0] ""
288 | msgstr[1] ""
289 |
290 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
291 | #: wpvulnerability-admin.php:911 wpvulnerability-adminms.php:997
292 | #, php-format
293 | msgid "Apache %s: "
294 | msgstr ""
295 |
296 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
297 | #: wpvulnerability-admin.php:928 wpvulnerability-adminms.php:1014
298 | #, php-format
299 | msgid "nginx %s: "
300 | msgstr ""
301 |
302 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
303 | #: wpvulnerability-admin.php:945 wpvulnerability-adminms.php:1031
304 | #, php-format
305 | msgid "MariaDB %s: "
306 | msgstr ""
307 |
308 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
309 | #: wpvulnerability-admin.php:962 wpvulnerability-adminms.php:1048
310 | #, php-format
311 | msgid "MySQL %s: "
312 | msgstr ""
313 |
314 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
315 | #: wpvulnerability-admin.php:977 wpvulnerability-adminms.php:1063
316 | #, php-format
317 | msgid "ImageMagick %s: "
318 | msgstr ""
319 |
320 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
321 | #: wpvulnerability-admin.php:992 wpvulnerability-adminms.php:1078
322 | #, php-format
323 | msgid "curl %s: "
324 | msgstr ""
325 |
326 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
327 | #: wpvulnerability-admin.php:1007 wpvulnerability-adminms.php:1093
328 | #, php-format
329 | msgid "memcached %s: "
330 | msgstr ""
331 |
332 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
333 | #: wpvulnerability-admin.php:1022 wpvulnerability-adminms.php:1108
334 | #, php-format
335 | msgid "Redis %s: "
336 | msgstr ""
337 |
338 | #. translators: Show the number of vulnerabilities in a WP-Admin dashboard
339 | #: wpvulnerability-admin.php:1037 wpvulnerability-adminms.php:1123
340 | #, php-format
341 | msgid "SQLite %s: "
342 | msgstr ""
343 |
344 | #: wpvulnerability-admin.php:1041 wpvulnerability-adminms.php:1127
345 | msgid "Vulnerability analysis of your WordPress installation:"
346 | msgstr ""
347 |
348 | #: wpvulnerability-admin.php:1147 wpvulnerability-adminms.php:1233
349 | msgid "More information? Visit"
350 | msgstr ""
351 |
352 | #: wpvulnerability-admin.php:1147 wpvulnerability-adminms.php:1233
353 | msgid "Site Health"
354 | msgstr ""
355 |
356 | #: wpvulnerability-admin.php:1164 wpvulnerability-adminms.php:1251
357 | msgid "WPVulnerability Status"
358 | msgstr ""
359 |
360 | #: wpvulnerability-admin.php:1193 wpvulnerability-adminms.php:1286
361 | msgid "Receive notifications in your email"
362 | msgstr ""
363 |
364 | #: wpvulnerability-admin.php:1201 wpvulnerability-adminms.php:1294
365 | msgid "Email addresses to notify (separated by commas)"
366 | msgstr ""
367 |
368 | #: wpvulnerability-admin.php:1210 wpvulnerability-adminms.php:1303
369 | msgid "How often you want to receive notifications"
370 | msgstr ""
371 |
372 | #: wpvulnerability-admin.php:1226 wpvulnerability-adminms.php:1318
373 | msgid "Vulnerabilities to hide"
374 | msgstr ""
375 |
376 | #: wpvulnerability-admin.php:1234 wpvulnerability-adminms.php:1326
377 | msgid "What do you want to hide?"
378 | msgstr ""
379 |
380 | #: wpvulnerability-adminms.php:124 wpvulnerability-adminms.php:218
381 | msgid "Settings saved."
382 | msgstr ""
383 |
384 | #: wpvulnerability-adminms.php:307 wpvulnerability-adminms.php:321
385 | msgid "Save Changes"
386 | msgstr ""
387 |
388 | #. translators: 1: core version
389 | #: wpvulnerability-core.php:31
390 | #, php-format
391 | msgid ""
392 | "WordPress %1$s has a known vulnerability that may be affecting this version."
393 | msgstr ""
394 |
395 | #: wpvulnerability-core.php:69 wpvulnerability-plugins.php:106
396 | #: wpvulnerability-process.php:65 wpvulnerability-process.php:99
397 | #: wpvulnerability-themes.php:104
398 | msgid "Global score: "
399 | msgstr ""
400 |
401 | #: wpvulnerability-core.php:72 wpvulnerability-plugins.php:109
402 | #: wpvulnerability-process.php:68 wpvulnerability-process.php:102
403 | #: wpvulnerability-themes.php:107
404 | msgid "Severity: "
405 | msgstr ""
406 |
407 | #: wpvulnerability-general.php:632
408 | msgid "None"
409 | msgstr ""
410 |
411 | #: wpvulnerability-general.php:633
412 | msgid "Low"
413 | msgstr ""
414 |
415 | #: wpvulnerability-general.php:634
416 | msgid "Medium"
417 | msgstr ""
418 |
419 | #: wpvulnerability-general.php:635
420 | msgid "High"
421 | msgstr ""
422 |
423 | #: wpvulnerability-general.php:636
424 | msgid "Critical"
425 | msgstr ""
426 |
427 | #: wpvulnerability-notifications.php:29
428 | msgid "Every week"
429 | msgstr ""
430 |
431 | #: wpvulnerability-notifications.php:55
432 | msgid "Every day"
433 | msgstr ""
434 |
435 | #. translators: %1$s the website of Database, %2$s database site name.
436 | #: wpvulnerability-notifications.php:136
437 | #, php-format
438 | msgid ""
439 | "Learn more about the WordPress Vulnerability Database API at %2$s"
441 | msgstr ""
442 |
443 | #: wpvulnerability-notifications.php:223
444 | msgid "No vulnerabilities found"
445 | msgstr ""
446 |
447 | #: wpvulnerability-notifications.php:224
448 | msgid "This is likely a test. The site does not have vulnerabilities."
449 | msgstr ""
450 |
451 | #: wpvulnerability-notifications.php:229
452 | msgid "Core vulnerabilities"
453 | msgstr ""
454 |
455 | #: wpvulnerability-notifications.php:235
456 | msgid "Plugins vulnerabilities"
457 | msgstr ""
458 |
459 | #: wpvulnerability-notifications.php:241
460 | msgid "Themes vulnerabilities"
461 | msgstr ""
462 |
463 | #: wpvulnerability-notifications.php:247
464 | msgid "PHP vulnerabilities"
465 | msgstr ""
466 |
467 | #: wpvulnerability-notifications.php:253
468 | msgid "Apache HTTPD vulnerabilities"
469 | msgstr ""
470 |
471 | #: wpvulnerability-notifications.php:259
472 | msgid "Nginx vulnerabilities"
473 | msgstr ""
474 |
475 | #: wpvulnerability-notifications.php:265
476 | msgid "MariaDB vulnerabilities"
477 | msgstr ""
478 |
479 | #: wpvulnerability-notifications.php:271
480 | msgid "MySQL vulnerabilities"
481 | msgstr ""
482 |
483 | #: wpvulnerability-notifications.php:277
484 | msgid "ImageMagick vulnerabilities"
485 | msgstr ""
486 |
487 | #: wpvulnerability-notifications.php:283
488 | msgid "curl vulnerabilities"
489 | msgstr ""
490 |
491 | #: wpvulnerability-notifications.php:289
492 | msgid "memcached vulnerabilities"
493 | msgstr ""
494 |
495 | #: wpvulnerability-notifications.php:295
496 | msgid "Redis vulnerabilities"
497 | msgstr ""
498 |
499 | #: wpvulnerability-notifications.php:301
500 | msgid "SQLite vulnerabilities"
501 | msgstr ""
502 |
503 | #. translators: Site name.
504 | #: wpvulnerability-notifications.php:324
505 | #, php-format
506 | msgid "Vulnerability found: %s"
507 | msgstr ""
508 |
509 | #: wpvulnerability-notifications.php:328
510 | msgid "Vulnerability found"
511 | msgstr ""
512 |
513 | #. translators: 1: Plugin name
514 | #. translators: 1: theme name
515 | #: wpvulnerability-plugins.php:47 wpvulnerability-themes.php:41
516 | #, php-format
517 | msgid "%1$s has a known vulnerability that may be affecting this version."
518 | msgstr ""
519 |
520 | #: wpvulnerability-plugins.php:89 wpvulnerability-process.php:50
521 | msgid "This plugin is closed. Please replace it with another."
522 | msgstr ""
523 |
524 | #: wpvulnerability-plugins.php:92 wpvulnerability-process.php:53
525 | msgid ""
526 | "This vulnerability appears to be unpatched. Stay tuned for upcoming plugin "
527 | "updates."
528 | msgstr ""
529 |
530 | #: wpvulnerability-plugins.php:439
531 | msgid "It hasn't been updated in over a year."
532 | msgstr ""
533 |
534 | #: wpvulnerability-plugins.php:445
535 | msgid "It may no longer be available (closed?)."
536 | msgstr ""
537 |
538 | #: wpvulnerability-plugins.php:483 wpvulnerability-plugins.php:490
539 | msgid "Last updated on"
540 | msgstr ""
541 |
542 | #. translators: the number of vulnerabilities.
543 | #: wpvulnerability-plugins.php:623 wpvulnerability-themes.php:368
544 | #, php-format
545 | msgid "Vulnerabilities (%d)"
546 | msgstr ""
547 |
548 | #. translators: the type of vulnerability.
549 | #: wpvulnerability-process.php:171
550 | #, php-format
551 | msgid "%s running"
552 | msgstr ""
553 |
554 | #: wpvulnerability-process.php:198
555 | msgid "Plugin"
556 | msgstr ""
557 |
558 | #: wpvulnerability-process.php:259
559 | msgid "Theme"
560 | msgstr ""
561 |
562 | #: wpvulnerability-run.php:30
563 | msgid "Network Settings"
564 | msgstr ""
565 |
566 | #: wpvulnerability-run.php:33
567 | msgid "Settings"
568 | msgstr ""
569 |
570 | #: wpvulnerability-run.php:533 wpvulnerability-run.php:582
571 | #: wpvulnerability-run.php:592 wpvulnerability-run.php:636
572 | msgid "Vulnerabilities"
573 | msgstr ""
574 |
575 | #: wpvulnerability-sitehealth.php:22
576 | msgid "There aren't plugins vulnerabilities"
577 | msgstr ""
578 |
579 | #: wpvulnerability-sitehealth.php:25 wpvulnerability-sitehealth.php:77
580 | #: wpvulnerability-sitehealth.php:129 wpvulnerability-sitehealth.php:210
581 | msgid "Security"
582 | msgstr ""
583 |
584 | #: wpvulnerability-sitehealth.php:30
585 | msgid "Shows possible vulnerabilities that exist in installed plugins."
586 | msgstr ""
587 |
588 | #. translators: Number of plugins vulnerabilities.
589 | #: wpvulnerability-sitehealth.php:43
590 | #, php-format
591 | msgid "There is %d plugin with vulnerabilities"
592 | msgid_plural "There are %d plugins with vulnerabilities"
593 | msgstr[0] ""
594 | msgstr[1] ""
595 |
596 | #: wpvulnerability-sitehealth.php:49
597 | msgid ""
598 | "We've detected potential vulnerabilities in installed plugins. Please check "
599 | "them and keep them updated."
600 | msgstr ""
601 |
602 | #: wpvulnerability-sitehealth.php:57
603 | msgid "Update plugins"
604 | msgstr ""
605 |
606 | #: wpvulnerability-sitehealth.php:74
607 | msgid "There aren't themes vulnerabilities"
608 | msgstr ""
609 |
610 | #: wpvulnerability-sitehealth.php:82
611 | msgid "Shows possible vulnerabilities that exist in installed themes."
612 | msgstr ""
613 |
614 | #. translators: Number of themes vulnerabilities.
615 | #: wpvulnerability-sitehealth.php:95
616 | #, php-format
617 | msgid "There is %d theme with vulnerabilities"
618 | msgid_plural "There are %d themes with vulnerabilities"
619 | msgstr[0] ""
620 | msgstr[1] ""
621 |
622 | #: wpvulnerability-sitehealth.php:101
623 | msgid ""
624 | "We've detected potential vulnerabilities in installed themes. Please check "
625 | "them and keep them updated."
626 | msgstr ""
627 |
628 | #: wpvulnerability-sitehealth.php:109
629 | msgid "Update themes"
630 | msgstr ""
631 |
632 | #: wpvulnerability-sitehealth.php:126
633 | msgid "There aren't WordPress vulnerabilities"
634 | msgstr ""
635 |
636 | #: wpvulnerability-sitehealth.php:134
637 | msgid "Shows possible vulnerabilities existing in the WordPress core."
638 | msgstr ""
639 |
640 | #. translators: Number of core vulnerabilities.
641 | #: wpvulnerability-sitehealth.php:147
642 | #, php-format
643 | msgid "There is %d core vulnerability"
644 | msgid_plural "There are %d core vulnerabilities"
645 | msgstr[0] ""
646 | msgstr[1] ""
647 |
648 | #: wpvulnerability-sitehealth.php:153
649 | msgid ""
650 | "We've detected potential vulnerabilities in this WordPress installation. "
651 | "Please check them and keep your installation updated."
652 | msgstr ""
653 |
654 | #: wpvulnerability-sitehealth.php:161
655 | msgid "Update WordPress"
656 | msgstr ""
657 |
658 | #: wpvulnerability-sitehealth.php:180
659 | msgid "Nginx"
660 | msgstr ""
661 |
662 | #: wpvulnerability-sitehealth.php:189
663 | msgid "Invalid software type"
664 | msgstr ""
665 |
666 | #: wpvulnerability-sitehealth.php:192
667 | msgid "Error"
668 | msgstr ""
669 |
670 | #: wpvulnerability-sitehealth.php:197
671 | msgid "The specified software type is not valid."
672 | msgstr ""
673 |
674 | #. translators: name of the software.
675 | #: wpvulnerability-sitehealth.php:207
676 | #, php-format
677 | msgid "There aren't %s vulnerabilities"
678 | msgstr ""
679 |
680 | #. translators: software with vulnerabilities.
681 | #: wpvulnerability-sitehealth.php:216
682 | #, php-format
683 | msgid "Shows possible vulnerabilities existing in %s."
684 | msgstr ""
685 |
686 | #. translators: Software and number of vulnerabilities.
687 | #: wpvulnerability-sitehealth.php:229
688 | #, php-format
689 | msgid "There is %1$d %2$s vulnerability"
690 | msgid_plural "There are %1$d %2$s vulnerabilities"
691 | msgstr[0] ""
692 | msgstr[1] ""
693 |
694 | #. translators: software with vulnerabilities.
695 | #: wpvulnerability-sitehealth.php:237
696 | #, php-format
697 | msgid ""
698 | "We've detected potential vulnerabilities in %s. Please check them and keep "
699 | "your installation updated."
700 | msgstr ""
701 |
702 | #: wpvulnerability-sitehealth.php:246
703 | msgid "How to update PHP"
704 | msgstr ""
705 |
706 | #: wpvulnerability-sitehealth.php:361
707 | msgid "WPVulnerability Core"
708 | msgstr ""
709 |
710 | #: wpvulnerability-sitehealth.php:369
711 | msgid "WPVulnerability Themes"
712 | msgstr ""
713 |
714 | #: wpvulnerability-sitehealth.php:377
715 | msgid "WPVulnerability Plugins"
716 | msgstr ""
717 |
718 | #: wpvulnerability-sitehealth.php:385
719 | msgid "WPVulnerability PHP"
720 | msgstr ""
721 |
722 | #: wpvulnerability-sitehealth.php:393
723 | msgid "WPVulnerability Apache HTTPD"
724 | msgstr ""
725 |
726 | #: wpvulnerability-sitehealth.php:401
727 | msgid "WPVulnerability Nginx"
728 | msgstr ""
729 |
730 | #: wpvulnerability-sitehealth.php:409
731 | msgid "WPVulnerability MariaDB"
732 | msgstr ""
733 |
734 | #: wpvulnerability-sitehealth.php:417
735 | msgid "WPVulnerability MySQL"
736 | msgstr ""
737 |
738 | #: wpvulnerability-sitehealth.php:425
739 | msgid "WPVulnerability ImageMagick"
740 | msgstr ""
741 |
742 | #: wpvulnerability-sitehealth.php:433
743 | msgid "WPVulnerability curl"
744 | msgstr ""
745 |
746 | #: wpvulnerability-sitehealth.php:441
747 | msgid "WPVulnerability memcached"
748 | msgstr ""
749 |
750 | #: wpvulnerability-sitehealth.php:449
751 | msgid "WPVulnerability redis"
752 | msgstr ""
753 |
754 | #: wpvulnerability-sitehealth.php:457
755 | msgid "WPVulnerability sqlite"
756 | msgstr ""
757 |
758 | #: wpvulnerability-themes.php:87
759 | msgid "This theme is closed. Please replace it with another."
760 | msgstr ""
761 |
762 | #: wpvulnerability-themes.php:90
763 | msgid ""
764 | "This vulnerability appears to be unpatched. Stay tuned for upcoming theme "
765 | "updates."
766 | msgstr ""
767 |
768 | #. Plugin URI of the plugin/theme
769 | msgid "https://www.wpvulnerability.com/"
770 | msgstr ""
771 |
772 | #. Description of the plugin/theme
773 | msgid ""
774 | "Receive information about possible vulnerabilities in your WordPress from "
775 | "WordPress Vulnerability Database API."
776 | msgstr ""
777 |
778 | #. Author of the plugin/theme
779 | msgid "Javier Casares"
780 | msgstr ""
781 |
782 | #. Author URI of the plugin/theme
783 | msgid "https://www.javiercasares.com/"
784 | msgstr ""
785 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === WPVulnerability ===
2 | Contributors: javiercasares, davidperez, lbonomo, alexclassroom
3 | Tags: security, vulnerability, site-health
4 | Requires at least: 4.1
5 | Tested up to: 6.8
6 | Stable tag: 4.0.4
7 | Requires PHP: 5.6
8 | Version: 4.0.4
9 | License: GPL-2.0-or-later
10 | License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
11 |
12 | Get WordPress vulnerability alerts from the [WPVulnerability Database API](https://www.wpvulnerability.com/).
13 |
14 | == Description ==
15 |
16 | This plugin integrates with the WPVulnerability API to provide real-time vulnerability assessments for your WordPress core, plugins, themes, PHP version, Apache HTTPD, nginx, MariaDB, MySQL, ImageMagick, curl, memcached, Redis, and SQLite.
17 |
18 | It delivers detailed reports directly within your WordPress dashboard, helping you stay aware of potential security risks. Configure the plugin to send periodic notifications about your site's security status, ensuring you remain informed without being overwhelmed. Designed for ease of use, it supports proactive security measures without storing or retrieving any personal data from your site.
19 |
20 | = Data reliability =
21 |
22 | The information provided by the information database comes from different sources that have been reviewed by third parties. There is no liability of any kind for the information. Act at your own risk.
23 |
24 | == Using the plugin ==
25 |
26 | = WP-CLI =
27 |
28 | You can use the following WP-CLI commands to manage and check vulnerabilities:
29 |
30 | * Core: `wp wpvulnerability core`
31 | * Plugins: `wp wpvulnerability plugins`
32 | * Themes: `wp wpvulnerability themes`
33 | * PHP: `wp wpvulnerability php`
34 | * Apache HTTPD: `wp wpvulnerability apache`
35 | * nginx: `wp wpvulnerability nginx`
36 | * MariaDB: `wp wpvulnerability mariadb`
37 | * MySQL: `wp wpvulnerability mysql`
38 | * ImageMagick: `wp wpvulnerability imagemagick`
39 | * curl: `wp wpvulnerability curl`
40 | * memcached: `wp wpvulnerability memcached`
41 | * Redis: `wp wpvulnerability redis`
42 | * SQLite: `wp wpvulnerability sqlite`
43 |
44 | All commands support the `--format` option to specify the output format:
45 |
46 | * `--format=table`: Displays the results in a table format (default).
47 | * `--format=json`: Displays the results in JSON format.
48 |
49 | Need help?
50 |
51 | * `wp wpvulnerability --help`: Displays help information for WPVulnerability commands.
52 | * `wp wpvulnerability [command] --help`: Displays help information for a WPVulnerability command.
53 |
54 | = REST API =
55 |
56 | The WPVulnerability plugin provides several **REST API endpoints** to fetch vulnerability information for different components of your WordPress site.
57 |
58 | * Core: `/wpvulnerability/v1/core`
59 | * Plugins: `/wpvulnerability/v1/plugins`
60 | * Themes: `/wpvulnerability/v1/themes`
61 | * PHP: `/wpvulnerability/v1/php`
62 | * Apache HTTPD: `/wpvulnerability/v1/apache`
63 | * nginx: `/wpvulnerability/v1/nginx`
64 | * MariaDB: `/wpvulnerability/v1/mariadb`
65 | * MySQL: `/wpvulnerability/v1/mysql`
66 | * ImageMagick: `/wpvulnerability/v1/imagemagick`
67 | * curl: `/wpvulnerability/v1/curl`
68 | * memcached: `/wpvulnerability/v1/memcached`
69 | * Redis: `/wpvulnerability/v1/redis`
70 | * SQLite: `/wpvulnerability/v1/sqlite`
71 |
72 | The WPVulnerability REST API uses **Application Passwords** for authentication. You need to include a valid Application Password in the Authorization header of your requests.
73 |
74 | Example Request with Authentication
75 |
76 | `curl -X GET https://example.com/wp-json/wpvulnerability/v1/plugins -u username:application_password`
77 |
78 | Replace username with your WordPress `username` and `application_password` with your [Application Password](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/).
79 |
80 | == Extra Configurations ==
81 |
82 | = "From:" mail (since: 3.2.2) =
83 |
84 | If, for some reason, you need the emails sent by the plugin to have a From different from the site administrator, you can change it from the `wp-config.php` by adding a constant:
85 |
86 | `define( 'WPVULNERABILITY_MAIL', 'sender@example.com' );`
87 |
88 | If the constant is active, it will be visible in the configuration screen.
89 |
90 | == Installation ==
91 |
92 | = Automatic download =
93 |
94 | Visit the plugin section in your WordPress, search for [wpvulnerability]; download and install the plugin.
95 |
96 | = Manual download =
97 |
98 | Extract the contents of the ZIP and upload the contents to the `/wp-content/plugins/wpvulnerability/` directory. Once uploaded, it will appear in your plugin list.
99 |
100 | == Frequently Asked Questions ==
101 |
102 | = Where does the vulnerability information come from? =
103 |
104 | The origin is in the WPVulnerability.com API. The vulnerabilities that appear in this API come from different sources, such as CVEs.
105 |
106 | = Is data from my site sent anywhere? =
107 |
108 | No. Never. Your privacy is very important to us. We do not commercialize with your data.
109 |
110 | = What vulnerabilities will I find? =
111 |
112 | Vulnerabilities in WordPress Core, Plugins, Themes, PHP, Apache HTTPD, nginx, MariaDB, MySQL, ImageMagick, curl, memcached, Redis, and SQLite are documented.
113 |
114 | = What do I do if my site has a vulnerability? =
115 |
116 | First of all, peace of mind. Investigate what the vulnerability is and, above all, check that you have the latest version of the compromised element. We actively recommend that you keep all your WordPress and its plugins up to date. Contact your hosting provider to patch non-WordPress vulnerabilities (like web server, databases, and other software).
117 |
118 | == Screenshots ==
119 |
120 | 1. WP-Admin Dashboard widget.
121 | 2. Vulnerability list at Plugins list.
122 | 3. Vulnerability list at Site Health.
123 |
124 | == Compatibility ==
125 |
126 | * WordPress: 4.1 - 6.8
127 | * PHP: 5.6 - 8.4
128 | * WP-CLI: 2.3.0 - 2.11.0
129 |
130 | == Changelog ==
131 |
132 | = [4.0.4] - 2025-04-07 =
133 |
134 | **Added**
135 |
136 | * Extra sanitizations.
137 |
138 | **Changed**
139 |
140 | * Translation improvements.
141 |
142 | **Fixed**
143 |
144 | * Plugin and translation load.
145 |
146 | **Compatibility**
147 |
148 | * WordPress: 4.1 - 6.8
149 | * PHP: 5.6 - 8.4
150 | * WP-CLI: 2.3.0 - 2.11.0
151 |
152 | **Tests**
153 |
154 | * PHP Coding Standards: 3.12.1
155 | * WordPress Coding Standards: 3.1.0
156 | * Plugin Check (PCP): 1.4.0
157 | * SonarCloud Code Review
158 |
159 | = [4.0.3] - 2024-10-28 =
160 |
161 | * Recreation of the 4.0.2 version. Something did not created the 4.0.2 version.
162 |
163 | = [4.0.2] - 2024-10-25 =
164 |
165 | **Fixed**
166 |
167 | * ImageMagick: it crashes in some cases where the hosting does not have ImageMagick.
168 |
169 | **Compatibility**
170 |
171 | * WordPress: 4.1 - 6.7
172 | * PHP: 5.6 - 8.4
173 | * WP-CLI: 2.3.0 - 2.11.0
174 |
175 | **Tests**
176 |
177 | * PHP Coding Standards: 3.10.3
178 | * WordPress Coding Standards: 3.1.0
179 | * Plugin Check (PCP): 1.1.0
180 | * SonarCloud Code Review
181 |
182 | = [4.0.1] - 2024-10-04 =
183 |
184 | **Fixed**
185 |
186 | * API endpoints: some API endpoints were failing.
187 | * CLI endpoints: some CLI endpoints were failing.
188 |
189 | **Compatibility**
190 |
191 | * WordPress: 4.1 - 6.7
192 | * PHP: 5.6 - 8.4
193 | * WP-CLI: 2.3.0 - 2.11.0
194 |
195 | **Tests**
196 |
197 | * PHP Coding Standards: 3.10.3
198 | * WordPress Coding Standards: 3.1.0
199 | * Plugin Check (PCP): 1.1.0
200 | * SonarCloud Code Review
201 |
202 | = [4.0.0] - 2024-10-01 =
203 |
204 | **Added**
205 |
206 | * ImageMagic vulnerabilities (Site Health + WP-CLI + API + mail).
207 | * curl vulnerabilities (Site Health + WP-CLI + API + mail).
208 | * memcached vulnerabilities (Site Health + WP-CLI + API + mail).
209 | * Redis vulnerabilities (Site Health + WP-CLI + API + mail).
210 | * SQLite vulnerabilities (Site Health + WP-CLI + API + mail).
211 |
212 | **Fixed**
213 |
214 | * Test email without email.
215 | * Improved MariaDB 11.x detection.
216 | * Improved versions detection (major-minor.patch-build).
217 | * WordPress < 5.3: use of wp_date().
218 | * WordPress < 5.0: locale detection.
219 | * Dashboard widget only for users with capabilities.
220 | * WordPress < 5.2: link to Site Health
221 |
222 | **Changed**
223 |
224 | * Big refactory.
225 | * Less files, less size, improved code quality.
226 |
227 | **Compatibility**
228 |
229 | * WordPress: 4.1 - 6.7
230 | * PHP: 5.6 - 8.4
231 | * WP-CLI: 2.3.0 - 2.11.0
232 |
233 | **Tests**
234 |
235 | * Manual Testing:
236 | * WordPress 6.7 / PHP 8.4
237 | * WordPress 6.6 / PHP 8.3
238 | * WordPress 6.4 / PHP 8.2
239 | * WordPress 6.1 / PHP 8.1
240 | * WordPress 5.8 / PHP 8.0
241 | * WordPress 5.5 / PHP 7.4
242 | * WordPress 5.3 / PHP 7.3
243 | * WordPress 4.9 / PHP 7.2
244 | * WordPress 4.8 / PHP 7.1
245 | * WordPress 4.6 / PHP 7.0
246 | * WordPress 4.1 / PHP 5.6
247 | * PHP Coding Standards: 3.10.3
248 | * WordPress Coding Standards: 3.1.0
249 | * Plugin Check (PCP): 1.1.0
250 | * SonarCloud Code Review
251 |
252 | = Previous versions =
253 |
254 | If you want to see the full changelog, visit the [changelog.txt](https://plugins.trac.wordpress.org/browser/wpvulnerability/trunk/changelog.txt) file.
255 |
256 | == Security ==
257 |
258 | This plugin adheres to the following security measures and review protocols for each version:
259 |
260 | * [WordPress Plugin Handbook](https://developer.wordpress.org/plugins/)
261 | * [WordPress Plugin Security](https://developer.wordpress.org/plugins/wordpress-org/plugin-security/)
262 | * [WordPress APIs Security](https://developer.wordpress.org/apis/security/)
263 | * [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)
264 | * [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)
265 | * [SonarCloud Code Review](https://www.sonarsource.com/products/sonarcloud/)
266 |
267 | == Privacy ==
268 |
269 | * This plugin or the WordPress Vulnerability Database API does not collect any information about your site, your identity, the plugins, themes or content the site has.
270 |
271 | == Vulnerabilities ==
272 |
273 | * No vulnerabilities have been published up to version 4.0.4.
274 |
275 | Found a security vulnerability? Please report it to us privately at the [WPVulnerability GitHub repository](https://github.com/javiercasares/wpvulnerability/security/advisories/new).
276 |
277 | == Contributors ==
278 |
279 | You can contribute to this plugin at the [WPVulnerability GitHub repository](https://github.com/javiercasares/wpvulnerability).
280 |
--------------------------------------------------------------------------------
/wpvulnerability-api.php:
--------------------------------------------------------------------------------
1 | trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['name'], 'strip' ) ) ),
52 | 'description' => trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['description'], 'strip' ) ) ),
53 | );
54 | }
55 | }
56 |
57 | // Process CVSS score.
58 | $core_complete_temp['score'] = null;
59 | if ( isset( $vulnerability['impact']['cvss']['score'] ) ) {
60 | $core_complete_temp['score'] = number_format( (float) $vulnerability['impact']['cvss']['score'], 1, '.', '' );
61 | }
62 |
63 | // Process vulnerability sources.
64 | $core_complete_temp['source'] = array();
65 | if ( isset( $vulnerability['source'] ) && count( $vulnerability['source'] ) ) {
66 | foreach ( $vulnerability['source'] as $vulnerability_source ) {
67 | $core_complete_temp['source'][] = array(
68 | 'name' => trim( html_entity_decode( wp_kses( (string) $vulnerability_source['name'], 'strip' ) ) ),
69 | 'link' => esc_url_raw( (string) $vulnerability_source['link'], 'strip' ),
70 | 'description' => trim( html_entity_decode( wp_kses( (string) $vulnerability_source['description'], 'strip' ) ) ),
71 | );
72 | }
73 | }
74 |
75 | $core_complete[] = $core_complete_temp;
76 | unset( $core_complete_temp );
77 | }
78 | }
79 |
80 | // Return the vulnerabilities in the response.
81 | return new WP_REST_Response( $core_complete, 200 );
82 | }
83 |
84 | /**
85 | * Handle the plugins vulnerabilities REST API request.
86 | *
87 | * This function handles the request for retrieving plugins vulnerabilities.
88 | * It includes the necessary files and fetches the vulnerabilities data.
89 | *
90 | * @since 3.3.0
91 | *
92 | * @return WP_REST_Response Plugins vulnerabilities data or a message if none found.
93 | */
94 | function wpvulnerability_rest_plugins_vulnerabilities() {
95 | // Include the files containing the functions to get plugins vulnerabilities.
96 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php';
97 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-plugins.php';
98 |
99 | // Get the plugins vulnerabilities.
100 | $plugins_vulnerabilities = wpvulnerability_plugin_get_vulnerabilities();
101 |
102 | $plugins_complete = array();
103 |
104 | // Loop through each plugin vulnerability.
105 | foreach ( $plugins_vulnerabilities as $plugin ) {
106 | // Check if the plugin is vulnerable.
107 | if ( 1 === $plugin['vulnerable'] ) {
108 | $plugins_complete_temp = array();
109 |
110 | // Process plugin name and slug.
111 | $plugins_complete_temp['name'] = trim( html_entity_decode( wp_kses( (string) $plugin['Name'], 'strip' ) ) );
112 | $plugins_complete_temp['slug'] = trim( html_entity_decode( wp_kses( (string) $plugin['slug'], 'strip' ) ) );
113 |
114 | // Prepare the vulnerabilities array for output.
115 | foreach ( $plugin['vulnerabilities'] as $vulnerability ) {
116 | $plugins_complete_temp_vulnerabilities = array();
117 |
118 | // Process vulnerability severity.
119 | $plugins_complete_temp_vulnerabilities['severity'] = null;
120 | if ( isset( $vulnerability['impact']['cvss']['severity'] ) ) {
121 | $plugins_complete_temp_vulnerabilities['severity'] = wpvulnerability_severity( $vulnerability['impact']['cvss']['severity'] );
122 | }
123 |
124 | // Process vulnerability details.
125 | $plugins_complete_temp_vulnerabilities['version'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['version'], 'strip' ) ) );
126 | $plugins_complete_temp_vulnerabilities['affected'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['versions'], 'strip' ) ) );
127 | $plugins_complete_temp_vulnerabilities['name'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['name'], 'strip' ) ) );
128 | $plugins_complete_temp_vulnerabilities['closed'] = (int) $vulnerability['closed'];
129 | $plugins_complete_temp_vulnerabilities['unfixed'] = (int) $vulnerability['unfixed'];
130 |
131 | // Process CWE details.
132 | $plugins_complete_temp_vulnerabilities['cwe'] = array();
133 | if ( isset( $vulnerability['impact']['cwe'] ) && count( $vulnerability['impact']['cwe'] ) ) {
134 | foreach ( $vulnerability['impact']['cwe'] as $vulnerability_cwe ) {
135 | $plugins_complete_temp_vulnerabilities['cwe'][] = array(
136 | 'name' => trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['name'], 'strip' ) ) ),
137 | 'description' => trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['description'], 'strip' ) ) ),
138 | );
139 | }
140 | }
141 |
142 | // Process CVSS score.
143 | $plugins_complete_temp_vulnerabilities['score'] = null;
144 | if ( isset( $vulnerability['impact']['cvss']['score'] ) ) {
145 | $plugins_complete_temp_vulnerabilities['score'] = number_format( (float) $vulnerability['impact']['cvss']['score'], 1, '.', '' );
146 | }
147 |
148 | // Process vulnerability sources.
149 | $plugins_complete_temp_vulnerabilities['source'] = array();
150 | if ( isset( $vulnerability['source'] ) && count( $vulnerability['source'] ) ) {
151 | foreach ( $vulnerability['source'] as $vulnerability_source ) {
152 | $plugins_complete_temp_vulnerabilities['source'][] = array(
153 | 'name' => trim( html_entity_decode( wp_kses( (string) $vulnerability_source['name'], 'strip' ) ) ),
154 | 'link' => esc_url_raw( (string) $vulnerability_source['link'], 'strip' ),
155 | );
156 | }
157 | }
158 |
159 | // Add processed vulnerability to the temporary array.
160 | $plugins_complete_temp['vulnerabilities'][] = $plugins_complete_temp_vulnerabilities;
161 | }
162 |
163 | // Add processed plugin data to the complete array.
164 | $plugins_complete[] = $plugins_complete_temp;
165 | }
166 | }
167 |
168 | // Return the vulnerabilities in the response.
169 | return new WP_REST_Response( $plugins_complete, 200 );
170 | }
171 |
172 | /**
173 | * Handle the themes vulnerabilities REST API request.
174 | *
175 | * This function handles the request for retrieving themes vulnerabilities.
176 | * It includes the necessary files and fetches the vulnerabilities data.
177 | *
178 | * @since 3.3.0
179 | *
180 | * @return WP_REST_Response Themes vulnerabilities data or a message if none found.
181 | */
182 | function wpvulnerability_rest_themes_vulnerabilities() {
183 | // Include the file containing the function to get themes vulnerabilities.
184 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php';
185 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-themes.php';
186 |
187 | // Get the themes vulnerabilities.
188 | $themes_vulnerabilities = wpvulnerability_theme_get_vulnerabilities();
189 |
190 | $themes_complete = array();
191 |
192 | // Loop through each theme vulnerability.
193 | foreach ( $themes_vulnerabilities as $theme ) {
194 | // Check if the theme is vulnerable.
195 | if ( 1 === $theme['wpvulnerability']['vulnerable'] ) {
196 | $themes_complete_temp = array();
197 |
198 | // Process theme name and slug.
199 | $themes_complete_temp['name'] = trim( html_entity_decode( wp_kses( (string) $theme['wpvulnerability']['name'], 'strip' ) ) );
200 | $themes_complete_temp['slug'] = trim( html_entity_decode( wp_kses( (string) $theme['wpvulnerability']['slug'], 'strip' ) ) );
201 |
202 | // Prepare the vulnerabilities array for output.
203 | foreach ( $theme['wpvulnerability']['vulnerabilities'] as $vulnerability ) {
204 | $themes_complete_temp_vulnerabilities = array();
205 |
206 | // Process vulnerability severity.
207 | $themes_complete_temp_vulnerabilities['severity'] = null;
208 | if ( isset( $vulnerability['impact']['cvss']['severity'] ) ) {
209 | $themes_complete_temp_vulnerabilities['severity'] = wpvulnerability_severity( $vulnerability['impact']['cvss']['severity'] );
210 | }
211 |
212 | // Process vulnerability details.
213 | $themes_complete_temp_vulnerabilities['version'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['version'], 'strip' ) ) );
214 | $themes_complete_temp_vulnerabilities['affected'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['versions'], 'strip' ) ) );
215 | $themes_complete_temp_vulnerabilities['name'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['name'], 'strip' ) ) );
216 | $themes_complete_temp_vulnerabilities['closed'] = (int) $vulnerability['closed'];
217 | $themes_complete_temp_vulnerabilities['unfixed'] = (int) $vulnerability['unfixed'];
218 |
219 | // Process CWE details.
220 | $themes_complete_temp_vulnerabilities['cwe'] = array();
221 | if ( isset( $vulnerability['impact']['cwe'] ) && count( $vulnerability['impact']['cwe'] ) ) {
222 | foreach ( $vulnerability['impact']['cwe'] as $vulnerability_cwe ) {
223 | $themes_complete_temp_vulnerabilities['cwe'][] = array(
224 | 'name' => trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['name'], 'strip' ) ) ),
225 | 'description' => trim( html_entity_decode( wp_kses( (string) $vulnerability_cwe['description'], 'strip' ) ) ),
226 | );
227 | }
228 | }
229 |
230 | // Process CVSS score.
231 | $themes_complete_temp_vulnerabilities['score'] = null;
232 | if ( isset( $vulnerability['impact']['cvss']['score'] ) ) {
233 | $themes_complete_temp_vulnerabilities['score'] = number_format( (float) $vulnerability['impact']['cvss']['score'], 1, '.', '' );
234 | }
235 |
236 | // Process vulnerability sources.
237 | $themes_complete_temp_vulnerabilities['source'] = array();
238 | if ( isset( $vulnerability['source'] ) && count( $vulnerability['source'] ) ) {
239 | foreach ( $vulnerability['source'] as $vulnerability_source ) {
240 | $themes_complete_temp_vulnerabilities['source'][] = array(
241 | 'name' => trim( html_entity_decode( wp_kses( (string) $vulnerability_source['name'], 'strip' ) ) ),
242 | 'link' => esc_url_raw( (string) $vulnerability_source['link'], 'strip' ),
243 | );
244 | }
245 | }
246 |
247 | // Add processed vulnerability to the temporary array.
248 | $themes_complete_temp['vulnerabilities'][] = $themes_complete_temp_vulnerabilities;
249 | }
250 |
251 | // Add processed theme data to the complete array.
252 | $themes_complete[] = $themes_complete_temp;
253 | }
254 | }
255 |
256 | // Return the vulnerabilities in the response.
257 | return new WP_REST_Response( $themes_complete, 200 );
258 | }
259 |
260 | /**
261 | * Handle vulnerabilities REST API request for different software types.
262 | *
263 | * This function processes the request to retrieve vulnerabilities for the specified software type.
264 | * It loads the necessary files and fetches the vulnerability data, then returns the data in a structured format.
265 | *
266 | * @since 3.5.0
267 | *
268 | * @param string $software_type The type of software to retrieve vulnerabilities for.
269 | * @return WP_REST_Response The vulnerabilities data or an empty array if none found.
270 | */
271 | function wpvulnerability_rest_software_vulnerabilities( $software_type ) {
272 | // Include the general file for retrieving vulnerabilities.
273 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php';
274 | require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-software.php';
275 |
276 | // Get vulnerabilities based on the software type.
277 | $vulnerabilities = array();
278 | switch ( $software_type ) {
279 | case 'php':
280 | case 'apache':
281 | case 'nginx':
282 | case 'mariadb':
283 | case 'mysql':
284 | case 'imagemagick':
285 | case 'curl':
286 | case 'memcached':
287 | case 'redis':
288 | case 'sqlite':
289 | $vulnerabilities = wpvulnerability_get_vulnerabilities( $software_type, wpvulnerability_get_software_version( $software_type ) );
290 | break;
291 | default:
292 | WP_REST_Response( array(), 400 ); // Invalid software type.
293 | }
294 |
295 | $complete_vulnerabilities = array();
296 |
297 | if ( isset( $vulnerabilities ) && is_array( $vulnerabilities ) ) {
298 | // Process each vulnerability.
299 | foreach ( $vulnerabilities as $vulnerability ) {
300 | $temp = array();
301 |
302 | $temp['version'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['version'], 'strip' ) ) );
303 | $temp['affected'] = trim( html_entity_decode( wp_kses( (string) $vulnerability['versions'], 'strip' ) ) );
304 | $temp['unfixed'] = (int) $vulnerability['unfixed'];
305 |
306 | // Process vulnerability sources.
307 | $temp['source'] = array();
308 | if ( isset( $vulnerability['source'] ) && count( $vulnerability['source'] ) ) {
309 | foreach ( $vulnerability['source'] as $source ) {
310 | $temp['source'][] = array(
311 | 'name' => trim( html_entity_decode( wp_kses( (string) $source['id'], 'strip' ) ) ),
312 | 'description' => trim( html_entity_decode( wp_kses( (string) $source['description'], 'strip' ) ) ),
313 | 'link' => esc_url_raw( (string) $source['link'], 'strip' ),
314 | );
315 | }
316 | }
317 |
318 | // Add processed vulnerability to the complete array.
319 | $complete_vulnerabilities[] = $temp;
320 | }
321 | }
322 |
323 | // Return the vulnerabilities in the response.
324 | return new WP_REST_Response( $complete_vulnerabilities, 200 );
325 | }
326 |
327 | /**
328 | * Handle the PHP vulnerabilities REST API request.
329 | *
330 | * @since 3.3.0
331 | *
332 | * @return WP_REST_Response PHP vulnerabilities data or a message if none found.
333 | */
334 | function wpvulnerability_rest_php_vulnerabilities() {
335 | return wpvulnerability_rest_software_vulnerabilities( 'php' );
336 | }
337 |
338 | /**
339 | * Handle the Apache vulnerabilities REST API request.
340 | *
341 | * @since 3.3.0
342 | *
343 | * @return WP_REST_Response Apache vulnerabilities data or a message if none found.
344 | */
345 | function wpvulnerability_rest_apache_vulnerabilities() {
346 | return wpvulnerability_rest_software_vulnerabilities( 'apache' );
347 | }
348 |
349 | /**
350 | * Handle the Nginx vulnerabilities REST API request.
351 | *
352 | * @since 3.3.0
353 | *
354 | * @return WP_REST_Response Nginx vulnerabilities data or a message if none found.
355 | */
356 | function wpvulnerability_rest_nginx_vulnerabilities() {
357 | return wpvulnerability_rest_software_vulnerabilities( 'nginx' );
358 | }
359 |
360 | /**
361 | * Handle the MariaDB vulnerabilities REST API request.
362 | *
363 | * @since 3.4.0
364 | *
365 | * @return WP_REST_Response MariaDB vulnerabilities data or an empty array if none found.
366 | */
367 | function wpvulnerability_rest_mariadb_vulnerabilities() {
368 | return wpvulnerability_rest_software_vulnerabilities( 'mariadb' );
369 | }
370 |
371 | /**
372 | * Handle the MySQL vulnerabilities REST API request.
373 | *
374 | * @since 3.4.0
375 | *
376 | * @return WP_REST_Response MySQL vulnerabilities data or an empty array if none found.
377 | */
378 | function wpvulnerability_rest_mysql_vulnerabilities() {
379 | return wpvulnerability_rest_software_vulnerabilities( 'mysql' );
380 | }
381 |
382 | /**
383 | * Handle the ImageMagick vulnerabilities REST API request.
384 | *
385 | * @since 3.5.0
386 | *
387 | * @return WP_REST_Response ImageMagick vulnerabilities data or an empty array if none found.
388 | */
389 | function wpvulnerability_rest_imagemagick_vulnerabilities() {
390 | return wpvulnerability_rest_software_vulnerabilities( 'imagemagick' );
391 | }
392 |
393 | /**
394 | * Handle the curl vulnerabilities REST API request.
395 | *
396 | * @since 3.5.0
397 | *
398 | * @return WP_REST_Response curl vulnerabilities data or an empty array if none found.
399 | */
400 | function wpvulnerability_rest_curl_vulnerabilities() {
401 | return wpvulnerability_rest_software_vulnerabilities( 'curl' );
402 | }
403 |
404 | /**
405 | * Handle the memcached vulnerabilities REST API request.
406 | *
407 | * @since 3.5.0
408 | *
409 | * @return WP_REST_Response memcached vulnerabilities data or an empty array if none found.
410 | */
411 | function wpvulnerability_rest_memcached_vulnerabilities() {
412 | return wpvulnerability_rest_software_vulnerabilities( 'memcached' );
413 | }
414 |
415 | /**
416 | * Handle the Redis vulnerabilities REST API request.
417 | *
418 | * @since 3.5.0
419 | *
420 | * @return WP_REST_Response Redis vulnerabilities data or an empty array if none found.
421 | */
422 | function wpvulnerability_rest_redis_vulnerabilities() {
423 | return wpvulnerability_rest_software_vulnerabilities( 'redis' );
424 | }
425 |
426 | /**
427 | * Handle the SQLite vulnerabilities REST API request.
428 | *
429 | * @since 3.5.0
430 | *
431 | * @return WP_REST_Response SQLite vulnerabilities data or an empty array if none found.
432 | */
433 | function wpvulnerability_rest_sqlite_vulnerabilities() {
434 | return wpvulnerability_rest_software_vulnerabilities( 'sqlite' );
435 | }
436 |
437 | /**
438 | * Custom permission check for the WPVulnerability REST API.
439 | *
440 | * This function checks if the request is authenticated using an Application Password.
441 | *
442 | * @since 3.3.0
443 | *
444 | * @param WP_REST_Request $request The REST API request.
445 | *
446 | * @return bool True if the user has permission, false otherwise.
447 | */
448 | function wpvulnerability_permission_check( WP_REST_Request $request ) {
449 |
450 | // Check if application passwords are available.
451 | if ( wp_is_application_passwords_available() ) {
452 | $authorization_header = $request->get_header( 'authorization' );
453 |
454 | // Check if the authorization header is present and properly formatted.
455 | if ( $authorization_header && preg_match( '/^Basic\s(.+)$/i', $authorization_header, $matches ) ) {
456 | $auth_string = base64_decode( (string) $matches[1] ); // phpcs:ignore
457 | list( $user, $password ) = explode( ':', $auth_string );
458 |
459 | // Authenticate the user using the application password.
460 | if ( wp_authenticate_application_password( null, $user, $password ) instanceof WP_User ) {
461 | return true;
462 | }
463 | }
464 | }
465 |
466 | return false;
467 | }
468 |
469 | /**
470 | * Registers REST API routes for WPVulnerability.
471 | *
472 | * This function sets up the REST API routes for WPVulnerability to handle requests
473 | * related to vulnerabilities in various components like core, plugins, themes, PHP, and more.
474 | *
475 | * @since 3.3.0
476 | *
477 | * @return void
478 | */
479 | function wpvulnerability_register_rest_routes() {
480 |
481 | // Define the endpoints to be registered.
482 | $endpoints = array(
483 | 'core',
484 | 'plugins',
485 | 'themes',
486 | 'php',
487 | 'apache',
488 | 'nginx',
489 | 'mariadb',
490 | 'mysql',
491 | 'imagemagick',
492 | 'curl',
493 | 'memcached',
494 | 'redis',
495 | 'sqlite',
496 | );
497 |
498 | // Loop through each endpoint and register it.
499 | foreach ( $endpoints as $endpoint ) {
500 | register_rest_route(
501 | 'wpvulnerability/v1', // Namespace and version.
502 | '/' . $endpoint, // Endpoint URL.
503 | array(
504 | 'methods' => 'GET', // HTTP method.
505 | 'callback' => 'wpvulnerability_rest_' . $endpoint . '_vulnerabilities', // Callback function.
506 | 'permission_callback' => 'wpvulnerability_permission_check', // Permission check callback.
507 | )
508 | );
509 | }
510 | }
511 |
512 | // Hook to initialize REST API endpoints.
513 | add_action( 'rest_api_init', 'wpvulnerability_register_rest_routes' );
514 |
--------------------------------------------------------------------------------
/wpvulnerability-core.php:
--------------------------------------------------------------------------------
1 | ' . $message . '
WordPress ' . wp_kses( (string) $vulnerability['name'], 'strip' ) . ' | '; 62 | $information .= '';
63 | if ( count( $what ) ) {
64 | $information .= ' ' . implode( '', $what ) . ' ';
65 | }
66 | if ( ! is_null( $score ) || ! is_null( $severity ) ) {
67 | $information .= '';
68 | if ( ! is_null( $score ) ) {
69 | $information .= ' ';
75 | }
76 | $information .= wp_kses( (string) $source, 'post' );
77 | $information .= '' . __( 'Global score: ', 'wpvulnerability' ) . $score . ' / 10 ';
70 | }
71 | if ( ! is_null( $severity ) ) {
72 | $information .= '' . __( 'Severity: ', 'wpvulnerability' ) . $severity . ' ';
73 | }
74 | $information .= ' | ';
78 | $information .= '
' . "\n"; 104 | $message .= ' | ' . "\n";
105 | $message .= ' ' . "\n";
106 | $message .= ' ' . "\n";
158 | $message .= '
| ' . "\n";
159 | $message .= '
' . esc_html__( 'This is likely a test. The site does not have vulnerabilities.', 'wpvulnerability' ) . '
'; 225 | } 226 | 227 | // Append core vulnerabilities HTML to the email content. 228 | if ( ! empty( $html_core ) ) { 229 | $email_content .= '%s
', 30 | __( 'Shows possible vulnerabilities that exist in installed plugins.', 'wpvulnerability' ) 31 | ), 32 | 'actions' => '', 33 | 'test' => 'wpvulnerability_plugins', 34 | ); 35 | 36 | // Check if any plugin vulnerabilities were found. 37 | $wpvulnerability_test_plugins_counter = is_multisite() ? json_decode( get_site_option( 'wpvulnerability-plugins-vulnerable' ) ) : json_decode( get_option( 'wpvulnerability-plugins-vulnerable' ) ); 38 | 39 | if ( $wpvulnerability_test_plugins_counter ) { 40 | $result['status'] = 'critical'; 41 | $result['label'] = sprintf( 42 | // translators: Number of plugins vulnerabilities. 43 | _n( 'There is %d plugin with vulnerabilities', 'There are %d plugins with vulnerabilities', $wpvulnerability_test_plugins_counter, 'wpvulnerability' ), 44 | $wpvulnerability_test_plugins_counter 45 | ); 46 | $result['badge']['color'] = 'red'; 47 | $result['description'] = sprintf( 48 | '%1$s
%2$s', 49 | __( 'We\'ve detected potential vulnerabilities in installed plugins. Please check them and keep them updated.', 'wpvulnerability' ), 50 | wpvulnerability_html_plugins() 51 | ); 52 | 53 | // Add action links to update plugins. 54 | $result['actions'] .= sprintf( 55 | '', 56 | esc_url( is_multisite() ? network_admin_url( 'plugins.php' ) : admin_url( 'plugins.php' ) ), 57 | __( 'Update plugins', 'wpvulnerability' ) 58 | ); 59 | } 60 | 61 | return $result; 62 | } 63 | 64 | /** 65 | * Tests for vulnerabilities in installed themes. 66 | * 67 | * @version 2.0.0 68 | * 69 | * @return array Returns an array with the results of the vulnerability test. 70 | */ 71 | function wpvulnerability_test_themes() { 72 | // Define the initial test result values. 73 | $result = array( 74 | 'label' => __( 'There aren\'t themes vulnerabilities', 'wpvulnerability' ), 75 | 'status' => 'good', 76 | 'badge' => array( 77 | 'label' => __( 'Security', 'wpvulnerability' ), 78 | 'color' => 'green', 79 | ), 80 | 'description' => sprintf( 81 | '%s
', 82 | __( 'Shows possible vulnerabilities that exist in installed themes.', 'wpvulnerability' ) 83 | ), 84 | 'actions' => '', 85 | 'test' => 'wpvulnerability_themes', 86 | ); 87 | 88 | // Check if any theme vulnerabilities were found. 89 | $wpvulnerability_test_themes_counter = is_multisite() ? json_decode( get_site_option( 'wpvulnerability-themes-vulnerable' ) ) : json_decode( get_option( 'wpvulnerability-themes-vulnerable' ) ); 90 | 91 | if ( $wpvulnerability_test_themes_counter ) { 92 | $result['status'] = 'critical'; 93 | $result['label'] = sprintf( 94 | // translators: Number of themes vulnerabilities. 95 | _n( 'There is %d theme with vulnerabilities', 'There are %d themes with vulnerabilities', $wpvulnerability_test_themes_counter, 'wpvulnerability' ), 96 | $wpvulnerability_test_themes_counter 97 | ); 98 | $result['badge']['color'] = 'red'; 99 | $result['description'] = sprintf( 100 | '%1$s
%2$s', 101 | __( 'We\'ve detected potential vulnerabilities in installed themes. Please check them and keep them updated.', 'wpvulnerability' ), 102 | wpvulnerability_html_themes() 103 | ); 104 | 105 | // Add action links to update themes. 106 | $result['actions'] .= sprintf( 107 | '', 108 | esc_url( is_multisite() ? network_admin_url( 'themes.php' ) : admin_url( 'themes.php' ) ), 109 | __( 'Update themes', 'wpvulnerability' ) 110 | ); 111 | } 112 | 113 | return $result; 114 | } 115 | 116 | /** 117 | * Tests for vulnerabilities in core. 118 | * 119 | * @version 2.0.0 120 | * 121 | * @return array Returns an array with the results of the vulnerability test. 122 | */ 123 | function wpvulnerability_test_core() { 124 | // Define the initial test result values. 125 | $result = array( 126 | 'label' => __( 'There aren\'t WordPress vulnerabilities', 'wpvulnerability' ), 127 | 'status' => 'good', 128 | 'badge' => array( 129 | 'label' => __( 'Security', 'wpvulnerability' ), 130 | 'color' => 'green', 131 | ), 132 | 'description' => sprintf( 133 | '%s
', 134 | __( 'Shows possible vulnerabilities existing in the WordPress core.', 'wpvulnerability' ) 135 | ), 136 | 'actions' => '', 137 | 'test' => 'wpvulnerability_core', 138 | ); 139 | 140 | // Check if any core vulnerabilities were found. 141 | $wpvulnerability_test_core_counter = is_multisite() ? json_decode( get_site_option( 'wpvulnerability-core-vulnerable' ) ) : json_decode( get_option( 'wpvulnerability-core-vulnerable' ) ); 142 | 143 | if ( $wpvulnerability_test_core_counter ) { 144 | $result['status'] = 'critical'; 145 | $result['label'] = sprintf( 146 | // translators: Number of core vulnerabilities. 147 | _n( 'There is %d core vulnerability', 'There are %d core vulnerabilities', $wpvulnerability_test_core_counter, 'wpvulnerability' ), 148 | $wpvulnerability_test_core_counter 149 | ); 150 | $result['badge']['color'] = 'red'; 151 | $result['description'] = sprintf( 152 | '%1$s
%2$s', 153 | __( 'We\'ve detected potential vulnerabilities in this WordPress installation. Please check them and keep your installation updated.', 'wpvulnerability' ), 154 | wpvulnerability_html_core() 155 | ); 156 | 157 | // Add action links to update WordPress. 158 | $result['actions'] .= sprintf( 159 | '', 160 | esc_url( is_multisite() ? network_admin_url( 'update-core.php' ) : admin_url( 'update-core.php' ) ), 161 | __( 'Update WordPress', 'wpvulnerability' ) 162 | ); 163 | } 164 | 165 | return $result; 166 | } 167 | 168 | /** 169 | * Tests for vulnerabilities in a specified software component. 170 | * 171 | * @version 3.5.0 172 | * 173 | * @param string $software The type of software to test (php, apache, nginx, mariadb, mysql). 174 | * @return array Returns an array with the results of the vulnerability test. 175 | */ 176 | function wpvulnerability_test_software( $software ) { 177 | $software_list = array( 178 | 'php' => __( 'PHP', 'wpvulnerability' ), 179 | 'apache' => __( 'Apache HTTPD', 'wpvulnerability' ), 180 | 'nginx' => __( 'Nginx', 'wpvulnerability' ), 181 | 'mariadb' => __( 'MariaDB', 'wpvulnerability' ), 182 | 'mysql' => __( 'MySQL', 'wpvulnerability' ), 183 | 'imagemagick' => __( 'ImageMagick', 'wpvulnerability' ), 184 | 'curl' => __( 'curl', 'wpvulnerability' ), 185 | ); 186 | 187 | if ( ! array_key_exists( $software, $software_list ) ) { 188 | return array( 189 | 'label' => __( 'Invalid software type', 'wpvulnerability' ), 190 | 'status' => 'error', 191 | 'badge' => array( 192 | 'label' => __( 'Error', 'wpvulnerability' ), 193 | 'color' => 'red', 194 | ), 195 | 'description' => sprintf( 196 | '%s
', 197 | __( 'The specified software type is not valid.', 'wpvulnerability' ) 198 | ), 199 | 'actions' => '', 200 | 'test' => 'wpvulnerability_' . $software, 201 | ); 202 | } 203 | 204 | // Define the initial test result values. 205 | $result = array( 206 | // translators: name of the software. 207 | 'label' => sprintf( __( 'There aren\'t %s vulnerabilities', 'wpvulnerability' ), $software_list[ $software ] ), 208 | 'status' => 'good', 209 | 'badge' => array( 210 | 'label' => __( 'Security', 'wpvulnerability' ), 211 | 'color' => 'green', 212 | ), 213 | 'description' => sprintf( 214 | '%s
', 215 | // translators: software with vulnerabilities. 216 | sprintf( __( 'Shows possible vulnerabilities existing in %s.', 'wpvulnerability' ), $software_list[ $software ] ) 217 | ), 218 | 'actions' => '', 219 | 'test' => 'wpvulnerability_' . $software, 220 | ); 221 | 222 | // Check if any vulnerabilities were found. 223 | $vulnerability_counter = is_multisite() ? json_decode( get_site_option( 'wpvulnerability-' . $software . '-vulnerable' ) ) : json_decode( get_option( 'wpvulnerability-' . $software . '-vulnerable' ) ); 224 | 225 | if ( $vulnerability_counter ) { 226 | $result['status'] = 'critical'; 227 | $result['label'] = sprintf( 228 | // translators: Software and number of vulnerabilities. 229 | _n( 'There is %1$d %2$s vulnerability', 'There are %1$d %2$s vulnerabilities', $vulnerability_counter, 'wpvulnerability' ), 230 | $vulnerability_counter, 231 | $software_list[ $software ] 232 | ); 233 | $result['badge']['color'] = 'red'; 234 | $result['description'] = sprintf( 235 | '%1$s
%2$s', 236 | // translators: software with vulnerabilities. 237 | sprintf( __( 'We\'ve detected potential vulnerabilities in %s. Please check them and keep your installation updated.', 'wpvulnerability' ), $software_list[ $software ] ), 238 | wpvulnerability_html_software( $software ) 239 | ); 240 | 241 | // Add specific action links if necessary. 242 | if ( 'php' === $software ) { 243 | $result['actions'] .= sprintf( 244 | '', 245 | esc_url( wp_get_update_php_url() ), 246 | __( 'How to update PHP', 'wpvulnerability' ) 247 | ); 248 | } 249 | } 250 | 251 | return $result; 252 | } 253 | 254 | /** 255 | * Tests for vulnerabilities in MySQL. 256 | * 257 | * @return array Returns an array with the results of the vulnerability test. 258 | */ 259 | function wpvulnerability_test_mysql() { 260 | return wpvulnerability_test_software( 'mysql' ); 261 | } 262 | 263 | /** 264 | * Tests for vulnerabilities in MariaDB. 265 | * 266 | * @return array Returns an array with the results of the vulnerability test. 267 | */ 268 | function wpvulnerability_test_mariadb() { 269 | return wpvulnerability_test_software( 'mariadb' ); 270 | } 271 | 272 | /** 273 | * Tests for vulnerabilities in Apache. 274 | * 275 | * @return array Returns an array with the results of the vulnerability test. 276 | */ 277 | function wpvulnerability_test_apache() { 278 | return wpvulnerability_test_software( 'apache' ); 279 | } 280 | 281 | /** 282 | * Tests for vulnerabilities in Nginx. 283 | * 284 | * @return array Returns an array with the results of the vulnerability test. 285 | */ 286 | function wpvulnerability_test_nginx() { 287 | return wpvulnerability_test_software( 'nginx' ); 288 | } 289 | 290 | /** 291 | * Tests for vulnerabilities in PHP. 292 | * 293 | * @return array Returns an array with the results of the vulnerability test. 294 | */ 295 | function wpvulnerability_test_php() { 296 | return wpvulnerability_test_software( 'php' ); 297 | } 298 | 299 | /** 300 | * Tests for vulnerabilities in ImageMagick. 301 | * 302 | * @return array Returns an array with the results of the vulnerability test. 303 | */ 304 | function wpvulnerability_test_imagemagick() { 305 | return wpvulnerability_test_software( 'imagemagick' ); 306 | } 307 | 308 | /** 309 | * Tests for vulnerabilities in curl. 310 | * 311 | * @return array Returns an array with the results of the vulnerability test. 312 | */ 313 | function wpvulnerability_test_curl() { 314 | return wpvulnerability_test_software( 'curl' ); 315 | } 316 | 317 | /** 318 | * Tests for vulnerabilities in memcached. 319 | * 320 | * @return array Returns an array with the results of the vulnerability test. 321 | */ 322 | function wpvulnerability_test_memcached() { 323 | return wpvulnerability_test_software( 'memcached' ); 324 | } 325 | 326 | /** 327 | * Tests for vulnerabilities in Redis. 328 | * 329 | * @return array Returns an array with the results of the vulnerability test. 330 | */ 331 | function wpvulnerability_test_redis() { 332 | return wpvulnerability_test_software( 'redis' ); 333 | } 334 | 335 | /** 336 | * Tests for vulnerabilities in SQLite. 337 | * 338 | * @return array Returns an array with the results of the vulnerability test. 339 | */ 340 | function wpvulnerability_test_sqlite() { 341 | return wpvulnerability_test_software( 'sqlite' ); 342 | } 343 | 344 | /** 345 | * Adds vulnerability tests to the Health Check & Troubleshooting page. 346 | * 347 | * This function registers various vulnerability tests for different components of the site, such as 348 | * WordPress core, themes, plugins, PHP, Apache, Nginx, MariaDB, and MySQL, to the Site Health status page. 349 | * 350 | * @since 2.0.0 351 | * 352 | * @param array $tests Array of current site status tests. 353 | * 354 | * @return array The updated array of site status tests. 355 | */ 356 | function wpvulnerability_tests( $tests ) { 357 | 358 | if ( wpvulnerability_analyze_filter( 'core' ) ) { 359 | // Add test for Core WordPress vulnerabilities. 360 | $tests['direct']['wpvulnerability_core'] = array( 361 | 'label' => __( 'WPVulnerability Core', 'wpvulnerability' ), 362 | 'test' => 'wpvulnerability_test_core', 363 | ); 364 | } 365 | 366 | if ( wpvulnerability_analyze_filter( 'themes' ) ) { 367 | // Add test for Theme vulnerabilities. 368 | $tests['direct']['wpvulnerability_themes'] = array( 369 | 'label' => __( 'WPVulnerability Themes', 'wpvulnerability' ), 370 | 'test' => 'wpvulnerability_test_themes', 371 | ); 372 | } 373 | 374 | if ( wpvulnerability_analyze_filter( 'plugins' ) ) { 375 | // Add test for Plugin vulnerabilities. 376 | $tests['direct']['wpvulnerability_plugins'] = array( 377 | 'label' => __( 'WPVulnerability Plugins', 'wpvulnerability' ), 378 | 'test' => 'wpvulnerability_test_plugins', 379 | ); 380 | } 381 | 382 | if ( wpvulnerability_analyze_filter( 'php' ) ) { 383 | // Add test for PHP vulnerabilities. 384 | $tests['direct']['wpvulnerability_php'] = array( 385 | 'label' => __( 'WPVulnerability PHP', 'wpvulnerability' ), 386 | 'test' => 'wpvulnerability_test_php', 387 | ); 388 | } 389 | 390 | if ( wpvulnerability_analyze_filter( 'apache' ) ) { 391 | // Add test for Apache vulnerabilities. 392 | $tests['direct']['wpvulnerability_apache'] = array( 393 | 'label' => __( 'WPVulnerability Apache HTTPD', 'wpvulnerability' ), 394 | 'test' => 'wpvulnerability_test_apache', 395 | ); 396 | } 397 | 398 | if ( wpvulnerability_analyze_filter( 'nginx' ) ) { 399 | // Add test for Nginx vulnerabilities. 400 | $tests['direct']['wpvulnerability_nginx'] = array( 401 | 'label' => __( 'WPVulnerability Nginx', 'wpvulnerability' ), 402 | 'test' => 'wpvulnerability_test_nginx', 403 | ); 404 | } 405 | 406 | if ( wpvulnerability_analyze_filter( 'mariadb' ) ) { 407 | // Add test for MariaDB vulnerabilities. 408 | $tests['direct']['wpvulnerability_mariadb'] = array( 409 | 'label' => __( 'WPVulnerability MariaDB', 'wpvulnerability' ), 410 | 'test' => 'wpvulnerability_test_mariadb', 411 | ); 412 | } 413 | 414 | if ( wpvulnerability_analyze_filter( 'mysql' ) ) { 415 | // Add test for MySQL vulnerabilities. 416 | $tests['direct']['wpvulnerability_mysql'] = array( 417 | 'label' => __( 'WPVulnerability MySQL', 'wpvulnerability' ), 418 | 'test' => 'wpvulnerability_test_mysql', 419 | ); 420 | } 421 | 422 | if ( wpvulnerability_analyze_filter( 'imagemagick' ) ) { 423 | // Add test for ImageMagick vulnerabilities. 424 | $tests['direct']['wpvulnerability_imagemagick'] = array( 425 | 'label' => __( 'WPVulnerability ImageMagick', 'wpvulnerability' ), 426 | 'test' => 'wpvulnerability_test_imagemagick', 427 | ); 428 | } 429 | 430 | if ( wpvulnerability_analyze_filter( 'curl' ) ) { 431 | // Add test for curl vulnerabilities. 432 | $tests['direct']['wpvulnerability_curl'] = array( 433 | 'label' => __( 'WPVulnerability curl', 'wpvulnerability' ), 434 | 'test' => 'wpvulnerability_test_curl', 435 | ); 436 | } 437 | 438 | if ( wpvulnerability_analyze_filter( 'memcached' ) ) { 439 | // Add test for memcached vulnerabilities. 440 | $tests['direct']['wpvulnerability_memcached'] = array( 441 | 'label' => __( 'WPVulnerability memcached', 'wpvulnerability' ), 442 | 'test' => 'wpvulnerability_test_memcached', 443 | ); 444 | } 445 | 446 | if ( wpvulnerability_analyze_filter( 'redis' ) ) { 447 | // Add test for Redis vulnerabilities. 448 | $tests['direct']['wpvulnerability_redis'] = array( 449 | 'label' => __( 'WPVulnerability redis', 'wpvulnerability' ), 450 | 'test' => 'wpvulnerability_test_redis', 451 | ); 452 | } 453 | 454 | if ( wpvulnerability_analyze_filter( 'sqlite' ) ) { 455 | // Add test for SQLite vulnerabilities. 456 | $tests['direct']['wpvulnerability_sqlite'] = array( 457 | 'label' => __( 'WPVulnerability sqlite', 'wpvulnerability' ), 458 | 'test' => 'wpvulnerability_test_sqlite', 459 | ); 460 | } 461 | 462 | return $tests; 463 | } 464 | 465 | // Adds the vulnerability tests to the site status tests. 466 | add_filter( 'site_status_tests', 'wpvulnerability_tests' ); 467 | -------------------------------------------------------------------------------- /wpvulnerability-software.php: -------------------------------------------------------------------------------- 1 | null, 82 | 'vulnerable' => 0, 83 | ); 84 | 85 | switch ( $software ) { 86 | case 'php': 87 | case 'apache': 88 | case 'nginx': 89 | case 'mysql': 90 | case 'mariadb': 91 | case 'imagemagick': 92 | case 'curl': 93 | case 'memcached': 94 | case 'redis': 95 | case 'sqlite': 96 | $version = wpvulnerability_get_software_version( $software ); 97 | break; 98 | 99 | default: 100 | return $data; 101 | } 102 | 103 | if ( $version ) { 104 | switch ( $software ) { 105 | case 'php': 106 | case 'apache': 107 | case 'nginx': 108 | case 'mysql': 109 | case 'mariadb': 110 | case 'imagemagick': 111 | case 'curl': 112 | case 'memcached': 113 | case 'redis': 114 | case 'sqlite': 115 | $api_response = wpvulnerability_get_vulnerabilities( $software, $version, 0 ); 116 | break; 117 | } 118 | 119 | if ( ! empty( $api_response ) ) { 120 | $data['vulnerabilities'] = $api_response; 121 | $data['vulnerable'] = 1; 122 | } 123 | } 124 | 125 | return $data; 126 | } 127 | 128 | 129 | /** 130 | * Get Installed Software 131 | * 132 | * Retrieves the list of installed software versions, checks for vulnerabilities, 133 | * caches the data, and sends an email notification if vulnerabilities are detected. 134 | * 135 | * @since 3.5.0 136 | * 137 | * @param string $software The software name (e.g., 'php', 'apache'). 138 | * 139 | * @return string JSON-encoded array of software data with vulnerabilities and vulnerable status. 140 | */ 141 | function wpvulnerability_get_installed( $software ) { 142 | 143 | $wpvulnerability_software_vulnerable = 0; 144 | 145 | // Retrieve fresh vulnerabilities for the installed software version. 146 | $data = wpvulnerability_get_fresh_vulnerabilities( $software ); 147 | 148 | // Check if the software version is vulnerable and count the vulnerabilities. 149 | if ( isset( $data['vulnerable'] ) && (int) $data['vulnerable'] ) { 150 | $wpvulnerability_software_vulnerable = count( $data['vulnerabilities'] ); 151 | } 152 | 153 | // Cache the vulnerability data and the timestamp for cache expiration. 154 | if ( is_multisite() ) { 155 | update_site_option( 'wpvulnerability-' . $software, wp_json_encode( $data ) ); 156 | update_site_option( 'wpvulnerability-' . $software . '-vulnerable', wp_json_encode( number_format( $wpvulnerability_software_vulnerable, 0, '.', '' ) ) ); 157 | update_site_option( 'wpvulnerability-' . $software . '-cache', wp_json_encode( number_format( time() + ( 3600 * WPVULNERABILITY_CACHE_HOURS ), 0, '.', '' ) ) ); 158 | } else { 159 | update_option( 'wpvulnerability-' . $software, wp_json_encode( $data ) ); 160 | update_option( 'wpvulnerability-' . $software . '-vulnerable', wp_json_encode( number_format( $wpvulnerability_software_vulnerable, 0, '.', '' ) ) ); 161 | update_option( 'wpvulnerability-' . $software . '-cache', wp_json_encode( number_format( time() + ( 3600 * WPVULNERABILITY_CACHE_HOURS ), 0, '.', '' ) ) ); 162 | } 163 | 164 | // Return the JSON-encoded array of software data. 165 | return wp_json_encode( $data ); 166 | } 167 | 168 | /** 169 | * Get the cached vulnerabilities or update the cache if it's stale or missing. 170 | * 171 | * @since 3.5.0 172 | * 173 | * @param string $software The software name (e.g., 'php', 'apache'). 174 | * 175 | * @return array|null Array of software data with vulnerabilities, or null if software is invalid. 176 | */ 177 | function wpvulnerability_software_get_vulnerabilities( $software ) { 178 | 179 | $valid_software = array( 'php', 'apache', 'mariadb', 'mysql', 'nginx', 'imagemagick', 'curl', 'memcached', 'redis', 'sqlite' ); 180 | 181 | // Use strict comparison for in_array. 182 | if ( in_array( $software, $valid_software, true ) ) { 183 | if ( is_multisite() ) { 184 | 185 | // Get the cached data and decode it. 186 | $data_cache = json_decode( get_site_option( 'wpvulnerability-' . $software . '-cache' ) ); 187 | 188 | // Get the installed data and decode it. 189 | $data = json_decode( get_site_option( 'wpvulnerability-' . $software ), true ); 190 | 191 | } else { 192 | 193 | // Get the cached data and decode it. 194 | $data_cache = json_decode( get_option( 'wpvulnerability-' . $software . '-cache' ) ); 195 | 196 | // Get the installed data and decode it. 197 | $data = json_decode( get_option( 'wpvulnerability-' . $software ), true ); 198 | 199 | } 200 | 201 | // If the cache is stale or the data is empty, update the cache. 202 | if ( $data_cache < time() || empty( $data ) ) { 203 | 204 | // Get the installed data and update the cache. 205 | $data = json_decode( wpvulnerability_get_installed( $software ), true ); 206 | 207 | } 208 | 209 | return $data; 210 | } else { 211 | return null; 212 | } 213 | } 214 | 215 | /** 216 | * Update the software cache and remove any old cache data. 217 | * 218 | * @since 3.0.0 219 | * 220 | * @param string $software The software name (e.g., 'php', 'apache'). 221 | * 222 | * @return void 223 | */ 224 | function wpvulnerability_get_vulnerabilities_clean( $software ) { 225 | 226 | // Update the installed software cache. 227 | wpvulnerability_get_installed( $software ); 228 | } 229 | -------------------------------------------------------------------------------- /wpvulnerability-themes.php: -------------------------------------------------------------------------------- 1 | get_stylesheet() ) { 35 | $tr_class .= 'active'; 36 | } 37 | 38 | // Generate the vulnerability notice message with the theme name. 39 | $message = sprintf( 40 | /* translators: 1: theme name */ 41 | __( '%1$s has a known vulnerability that may be affecting this version.', 'wpvulnerability' ), 42 | wp_kses( (string) $theme_data->get( 'Name' ), 'strip' ) 43 | ); 44 | 45 | // Begin generating the table row HTML markup with appropriate CSS classes and the vulnerability notice message. 46 | $information = ' ' . esc_html( $message ) . '
' . wp_kses( (string) $vulnerability['versions'], 'strip' ) . ' | '; 83 | $information .= '';
84 | if ( (int) $vulnerability['closed'] || (int) $vulnerability['unfixed'] ) {
85 | $information .= ' ';
86 | if ( (int) $vulnerability['closed'] ) {
87 | $information .= ' ';
93 | }
94 | if ( count( $what ) ) {
95 | $information .= '' . __( 'This theme is closed. Please replace it with another.', 'wpvulnerability' ) . ' ';
88 | }
89 | if ( (int) $vulnerability['unfixed'] ) {
90 | $information .= '' . __( 'This vulnerability appears to be unpatched. Stay tuned for upcoming theme updates.', 'wpvulnerability' ) . ' ';
91 | }
92 | $information .= '';
96 | foreach ( $what as $w ) {
97 | $information .= $w;
98 | }
99 | $information .= ' ';
100 | }
101 | if ( ! is_null( $score ) || ! is_null( $severity ) ) {
102 | $information .= '';
103 | if ( ! is_null( $score ) ) {
104 | $information .= ' ';
110 | }
111 | $information .= wp_kses( (string) $source, 'post' );
112 | $information .= '' . __( 'Global score: ', 'wpvulnerability' ) . $score . ' / 10 ';
105 | }
106 | if ( ! is_null( $severity ) ) {
107 | $information .= '' . __( 'Severity: ', 'wpvulnerability' ) . $severity . ' ';
108 | }
109 | $information .= ' | ';
113 | $information .= '