Hardening a Site That Accepts Member Uploads: Server Risks Plugin Updates Do Not Cover
Stop PHP running in uploads, narrow upload types, re-encode images, cap size, and get image libraries patched. Tested rules for nginx and Apache 2.4.

To harden a WordPress site that accepts member uploads, work from the server inward. Stop the uploads folder from running code, shorten the list of file types members can send, re-encode the images you keep, cap size and rate, and make sure whoever runs the server patches the image libraries under PHP. Plugin updates fix plugin code. They never touch ImageMagick, libheif or your web server rules, and those are the first things a hostile file meets.
We checked every command, filter and server rule below on 15 Nov 2026 in disposable containers: WordPress 7.1.4 on PHP 8.3, nginx 1.30 with PHP-FPM, and Apache 2.4.69 with mod_php. Anything we could not run is marked UNTESTED, and we link the documentation behind each claim that comes from it.
Which controls matter most for a member-upload site?
Start with the rows at the top. They cost little and each one removes a whole class of problem. The server-side rows need your host, or root access, and they are the ones plugin updates never cover.
Control | What it stops | What it can break | Effort |
|---|---|---|---|
No script execution in uploads | A stray .php file in uploads running as code | Nothing legitimate; plugins that cache PHP in uploads | Low (one server rule) |
Narrow | Unneeded parsers and risky formats | Members who send HEIC, DOCX or SVG | Low (one filter) |
Size and rate limits at PHP and the web server | Floods, memory exhaustion, giant images | Large camera originals if set too low | Low |
Re-encode member images | Appended payloads, odd metadata, polyglot files | Animated GIFs, EXIF data, some colour profiles | Medium |
ImageMagick policy | Dangerous coders, oversized images | PDF and SVG previews if you deny them | Medium (needs host or root) |
Image libraries patched by the host | Known library flaws such as the libheif case | Nothing, if PHP-FPM is restarted | Host dependent |
Private storage for sensitive files | Anyone with a link reading a private file | Simple direct links and some CDN setups | Medium to high |
Processing off the web server | A library exploit reaching your database and code | Adds a second system to run | High |
What does a plugin update not cover?
A member uploads a photo. WordPress checks the name and type and hands the file to an image editor, which hands it to a C or C++ library in the operating system or a PHP extension. Three layers touched that file, and only one updates from the dashboard.
- WordPress and your plugins decide who may upload, which types are allowed and where the file lands. Dashboard updates cover this layer.
- The web server (nginx or Apache) decides whether a file in the uploads folder can run as code and how big a request may be. Only your host or sysadmin changes it.
- PHP and the image libraries (GD, Imagick, ImageMagick, libheif) open the file. They arrive as system packages, so a patch is a host job followed by a PHP-FPM restart.
Member-upload sites feel this most. Strangers send files all day, registration is often open, and forms, avatars, galleries and attachments may each use a different upload path with different checks.
For the case where something already slipped through, our guide to checking and cleaning a site after a plugin file-upload flaw covers what to look for in the uploads folder and the logs.
How do I find out which image library my server really uses?
Do this first, because every later decision depends on the answer. You need four facts: which image editor WordPress picks, whether the Imagick extension is loaded, which ImageMagick sits behind it, and which format libraries such as libheif are installed. Checked on 15 Nov 2026.
# Which editor would WordPress use for a JPEG?
wp eval 'echo _wp_image_editor_choose( array( "mime_type" => "image/jpeg" ) ), "\n";'
# Can any editor on this server handle HEIC?
wp eval 'var_dump( wp_image_editor_supports( array( "mime_type" => "image/heic" ) ) );'
# Is Imagick loaded, and which ImageMagick is behind it?
wp eval 'echo extension_loaded( "imagick" ) ? Imagick::getVersion()["versionString"] : "no imagick", "\n";'
# Formats Imagick can read (HEIF family, SVG, MSL)
wp eval 'echo implode( " ", Imagick::queryFormats( "HEI*" ) ), "|\n";'
wp eval 'echo implode( " ", Imagick::queryFormats( "SVG*" ) ), "|\n";'
wp eval 'echo implode( " ", Imagick::queryFormats( "MSL" ) ), "|\n";'TESTED on WordPress 7.1.4 and PHP 8.3. That instance had Imagick 3.8.1 loaded against ImageMagick 7.1.2-35, yet WordPress picked WP_Image_Editor_GD for JPEG, HEIC support returned bool(false) and every format query came back empty. A loaded extension is not a working editor. If you expect Imagick and see GD, find out why before you write any policy for it.
_wp_image_editor_choose() is an internal function, fine for a one-off check; use wp_image_editor_supports() in code. The command line and the web server can run different PHP builds, so also open Tools, Site Health, Info, Media Handling for the web view.
# Command-line ImageMagick, if installed (version 7 and version 6 names)
magick -version
convert -version
# Is a libheif file loaded on this machine?
ldconfig -p | grep -i heif
# Debian and Ubuntu
apt list --installed 2>/dev/null | grep -i heif
# RHEL, AlmaLinux, Rocky, Fedora
rpm -qa | grep -i heifUNTESTED here, because our containers had no libheif package and no ImageMagick command-line tools, so adjust for your distribution. No output from the libheif lines means no such package. Write down the active editor, the ImageMagick version, whether HEIC is in the format list and the libheif version. That inventory is what you hand a host.
What was the libheif flaw, and what should I check today?
It is the worked example for why the library layer matters. The upstream advisory GHSA-x8r2-mggj-j6wr, published 1 September 2026, describes an out-of-bounds write in libheif’s decoder for the uncompressed image type. It is rated critical (CVSS 9.8) and lists no CVE ID. Affected versions are libheif 1.18.0 through 1.23.2, and 1.23.3 is the fixed release.
The advisory also narrows the risk. libheif must be built with WITH_UNCOMPRESSED_CODEC=ON, and the crafted file must use one specific image layout. The reporter’s file-reading and code-execution results apply to one particular WordPress deployment, and the advisory says they do not show universal remote code execution. Plain-language account: wppioneer.com.
So the calm reading is: real, fixed upstream, and dependent on how your server is built. Check whether libheif is installed, whether its version falls in the range, and whether your host’s package carries the fix. Distributions often backport a fix without changing the upstream version number, so ask the host or the distribution’s security tracker instead of judging by the number alone.
Ask your host the question in writing:
Subject: Image library patch status for example.com
Hello,
Our site accepts image uploads from members. Please tell us:
1. Which ImageMagick and libheif versions (if any) serve PHP for this account.
2. How quickly you apply security updates to these libraries.
3. Whether PHP-FPM is restarted after those updates.
4. Whether HEIC/HEIF decoding can be disabled for this account.
Thank you.Our earlier post on WordPress 7.0.4 and the Imagick and Ghostscript preconditions covers a related case where a core release and the image stack interacted.
Which file types should members be allowed to upload?
Only the types your members genuinely need, and fewer for members than for staff. WordPress ships a long default list (94 types on 7.1.4, checked 15 Nov 2026), and every entry is something a visitor can be served or a parser can open. The documented upload_mimes filter receives the list and the user, so you can return a short list to members and keep the full one for administrators.
// Example only: put it in a small plugin or an mu-plugin, not a theme.
// Checked on 15 Nov 2026.
add_filter(
'upload_mimes',
function ( $mimes, $user ) {
// Administrators keep the full WordPress list.
if ( $user && user_can( $user, 'manage_options' ) ) {
return $mimes;
}
// Everyone else: web images and PDF only.
return array(
'jpg|jpeg|jpe' => 'image/jpeg',
'png' => 'image/png',
'gif' => 'image/gif',
'webp' => 'image/webp',
'pdf' => 'application/pdf',
);
},
10,
2
);TESTED with wp eval: core returned 94 types with no user and 96 for an administrator, and with the filter a user with no capabilities got 5 and HEIC was absent. The two extra types for administrators are HTML and JS, which core only allows for users who hold unfiltered_html (get_allowed_mime_types() removes them for everyone else). We did not test it against a live community plugin’s upload form, so try it on staging first.
Limits: a plugin can register its own upload handler that never calls this filter, so test every upload surface, and an extension or MIME type is only a claim by the sender. The list shrinks exposure; it proves nothing about a given file.
Does WordPress check that a file really is what its name says?
Partly. wp_check_filetype_and_ext() looks at the content, not only the name. For images it uses wp_get_image_mime(), and it can supply a corrected filename when the extension is wrong. Otherwise, with the fileinfo extension loaded, it asks finfo_file() and clears the type if the answer does not match the extension. The result then has to appear in the allowed list. You can adjust it through the wp_check_filetype_and_ext filter.
We ran it against four files on 15 Nov 2026 (WordPress 7.1.4, fileinfo loaded):
File | Result | What it means |
|---|---|---|
|
| Rejected: the content is not an image |
A real PNG named |
| Accepted, and renamed to match its content |
A real PNG named |
| Accepted as is |
|
| Rejected by default: SVG is not in the core list |
A useful gate, with one honest gap: it confirms a file looks like an image, not that it is clean, because a valid image can carry extra bytes after its data. That is why you also re-encode and refuse execution in uploads.
Per-role rules such as a quarantine for new accounts fit the wp_handle_upload_prefilter hook, which runs before WordPress moves the file. Plugins with their own handler skip it.
Is the unfiltered uploads constant safe on a member site?
No, and you rarely need it. The constant switches on the unfiltered_upload capability. In core, map_meta_cap() returns do_not_allow for that capability unless ALLOW_UNFILTERED_UPLOADS is defined and true, and on multisite only for super admins. Once it is on, any user whose role holds the capability can upload files that fail the type check. By default that is administrators, so a stolen or phished admin account then uploads anything.
TESTED on 7.1.4: current_user_can( 'unfiltered_upload' ) returned false for an administrator without the constant and true with it. The upload code only consults the capability after the type or extension check has failed, so the constant is a bypass for the checks in the previous section, not a setting for one file type.
# Is the constant set anywhere?
wp config has ALLOW_UNFILTERED_UPLOADS && echo "constant is defined"
grep -rn "ALLOW_UNFILTERED_UPLOADS" wp-config.php wp-content/mu-plugins 2>/dev/null
# Which roles hold the capability?
wp cap list administrator | grep unfiltered_uploadTESTED: on our instance wp config has exited 1 (not defined) and the administrator role listed unfiltered_upload. If you need one extra type, add it through upload_mimes for that role and keep every other check on.
Should members be allowed to upload SVG files?
Not by default. SVG is an XML document that can contain scripts, which is why core leaves it out of the allowed list.
The common fix adds SVG to upload_mimes. We tested it: with svg mapped to image/svg+xml, our test file with an onload handler passed wp_check_filetype_and_ext() as a valid SVG. Core confirms the file is SVG. It does not clean it.
Where the file is shown matters. MDN documents that when SVG is used as an image (an <img> tag or a CSS background), browsers disable JavaScript and block external resources. When the SVG is opened directly at its URL, or embedded with iframe, object or embed, those limits do not apply (MDN, SVG as an image). A member-uploaded SVG has a public URL, so anyone can open it directly.
If members really need SVG (logos, badges), the options in order of preference are: accept it from staff only, sanitise it on upload, or convert it to PNG. For sanitising, Safe SVG is the established choice. On 15 Nov 2026 the WordPress.org API listed version 2.5.2, 1,000,000+ active installs, a rating of 4.9 from 79 ratings, last updated 26 Oct 2026 and tested up to WordPress 7.1.4. Its cons are the usual ones for a sanitiser: it is another plugin to keep updated, and a sanitiser can only remove what its rules recognise. Pair it with the response headers in the server section so a directly opened file is handled as data.
Should I re-encode member images?
Yes for photos and avatars, with an eye on the trade-offs. Re-encoding means the server decodes the upload and saves a fresh file, then serves that. Anything that was not pixel data (bytes appended after the image, odd metadata) does not survive. It does not make the first read safe, because decoding is the risky moment. What it does is limit what stays on your site and what other visitors download.
WordPress already scales originals above 2560 pixels (the big_image_size_threshold filter turns that off with false, so check nothing does so by accident). Since 6.7, HEIC uploads are converted to JPEG on the server when the server’s Imagick supports HEIC; otherwise the member sees a warning (core announcement). The image_editor_output_format filter maps input formats to output formats.
For member uploads, we re-encode the stored original too. This version runs on the wp_handle_upload filter, skips administrators, and refuses the upload if the file cannot be decoded:
// Re-encode non-admin image uploads so the stored file is a fresh decode and encode.
// Checked on 15 Nov 2026.
add_filter(
'wp_handle_upload',
function ( $upload ) {
$types = array( 'image/jpeg', 'image/png', 'image/webp' );
if ( empty( $upload['file'] ) || empty( $upload['type'] ) || ! in_array( $upload['type'], $types, true ) ) {
return $upload;
}
if ( current_user_can( 'manage_options' ) ) {
return $upload; // Trusted staff keep their originals.
}
$editor = wp_get_image_editor( $upload['file'] );
$saved = is_wp_error( $editor ) ? $editor : $editor->save( $upload['file'], $upload['type'] );
if ( is_wp_error( $saved ) ) {
wp_delete_file( $upload['file'] );
return array( 'error' => __( 'This image could not be processed. Try a different file.' ) );
}
return $upload;
}
);TESTED on WordPress 7.1.4 with the GD editor. We appended a PHP snippet to a valid PNG: the stored file went from 94 to 91 bytes and the payload was gone. A file that was not an image at all was deleted and the filter returned the error message. Not tested with Imagick as the editor, animated GIFs (they would flatten to one frame, which is why GIF is not in the list), or very large photos.
Trade-offs: EXIF data is stripped (a privacy gain, but test that phone photos keep their orientation), colour profiles may change, and the decode still happens on your web server, which is why the policy and limits matter.
How do I stop PHP running from the uploads folder?
Tell the web server that uploads are data, never code. If a script ever lands in the folder, through a plugin flaw, a bad extension check or a stolen account, the server should refuse to run it. Find the folder first:
wp eval 'echo wp_upload_dir()["basedir"], "\n";'Nginx and Apache differ, and so does the failure mode. Nginx never reads .htaccess, so the rules that WordPress guides put there do nothing on nginx. You need a location block in the server config.
Nginx
The nginx documentation says regular-expression locations are checked in file order and the first match wins, unless the longest matching prefix location carries the ^~ modifier, in which case regular expressions are not checked at all (nginx location docs). That gives a reliable pattern: a ^~ prefix for the uploads path, with a nested rule inside it.
# Checked on 15 Nov 2026 (nginx 1.30, PHP-FPM).
location ^~ /wp-content/uploads/ {
# Refuse anything PHP-shaped, including double extensions and path-info tricks.
location ~* \.(?:php|phtml|phar|php[0-9])(?:$|/|\.) {
return 403;
}
add_header X-Content-Type-Options "nosniff" always;
}
# Your normal PHP handler stays below, untouched.
location ~ \.php(?:$|/) {
# ... fastcgi settings ...
}TESTED. With this config, requests for uploads/test.php, shell.php.jpg, UPPER.PHP, x.phtml, a.jpg/x.php and shell.php/x.jpg all returned 403, a normal a.jpg returned 200 with the nosniff header, and a plugin PHP file outside uploads still ran. Run nginx -t, reload, then drop a harmless test.php into uploads on staging and confirm the 403 yourself.
The order mistake is real. We also tested the popular one-liner location ~* ^/wp-content/uploads/.*\.php$ { deny all; } placed after the general PHP handler. It never fired: uploads/test.php returned 200 and printed its output, and shell.php.jpg was served as raw source text. Put the uploads rule first, or use the ^~ form above.
Apache 2.4
Use <FilesMatch> with Require all denied, the Apache 2.4 syntax from mod_authz_core (Apache authz docs). The older Order and Deny pair belongs to mod_access_compat and should not be mixed in. Put it in the server or virtual host configuration if you can.
# Checked on 15 Nov 2026 (Apache 2.4.69, mod_php). Needs mod_headers for the Header line.
<Directory "/var/www/html/wp-content/uploads">
Options -Indexes -ExecCGI
<FilesMatch "(?i)\.(php|phtml|phar|php[0-9])(\.|$)">
Require all denied
</FilesMatch>
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>
</Directory>TESTED. Without the rule, uploads/test.php ran as code. With it, test.php, shell.php.jpg, UPPER.PHP and x.phtml all returned 403 and a.jpg returned 200 with nosniff. The pattern ends in (\.|$) on purpose. On servers that map handlers with AddHandler, the mod_mime documentation says a file with several extensions can match both a handler and a media type, and the handler wins (mod_mime, files with multiple extensions). That makes shell.php.jpg a risk on such setups, and the rule above catches it.
Inside an .htaccess file the same rule works if AllowOverride permits it (UNTESTED). On managed hosting, ask the host to apply the equivalent and confirm with a test file.
What should an ImageMagick policy block?
ImageMagick reads a policy.xml that decides which formats it may read or write and how many resources a job may use. Its security guidance says the more untrusted input you handle, the stricter the policy should be, and a public upload form is exactly that case (ImageMagick security policy). First check which file is active:
magick identify -list policy # ImageMagick 7
identify -list policy # ImageMagick 6The first line of the output names the policy file in use. That matters because packages can ship several copies and they can disagree. The Doyensec write-up (10 Jan 2023) recommends running find / -iname policy.xml and confirming the active file. UNTESTED on a live host, because our containers had no ImageMagick command-line tools, but we tested the policy below through the PHP extension.
<policymap>
<!-- Resource limits: one upload cannot use the whole server -->
<policy domain="resource" name="time" value="60"/>
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="area" value="64MP"/>
<policy domain="resource" name="disk" value="1GiB"/>
<policy domain="resource" name="list-length" value="16"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<!-- No indirect reads, delegates or filters -->
<policy domain="path" rights="none" pattern="-"/>
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="path" rights="none" pattern="|*"/>
<policy domain="delegate" rights="none" pattern="*"/>
<policy domain="filter" rights="none" pattern="*"/>
<!-- Deny every module, then allow web formats. The last matching rule wins. -->
<policy domain="module" rights="none" pattern="*"/>
<policy domain="module" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}"/>
</policymap>TESTED in a disposable wordpress:php8.3-apache container with ImageMagick 7.1.1-43, through the Imagick extension. With the default policy, a PNG, a text rendering and an MSL script file all opened. With the policy above, the PNG still opened, while SVG, MSL and TEXT were each refused with an error naming the security policy, and an image 20,000 pixels wide was refused by the width limit. The default on that Debian-based build allowed MSL, which is one more reason to check rather than assume.
- Order matters. The last matching rule wins, so the broad deny comes first. Patterns before ImageMagick 7.1.1-16 are case sensitive, so write format names in capitals.
- An allow-list drops formats you may use. This one denies PDF and SVG. WordPress uses Imagick with Ghostscript for PDF thumbnails, so if members upload PDFs and you want previews, accept no preview or allow PDF on a separate worker.
- HEIC. The allow-list excludes it. To deny only HEIC, add
<policy domain="coder" rights="none" pattern="{HEIC,HEIF}"/>(UNTESTED). WordPress 7.1 can decode HEIC in the browser, but its own post calls client-side processing “a performance optimization, not a trust boundary”, and the server still validates every upload (WordPress 7.1 client-side media processing). - Limits can reject real files. Test real phone photos on staging and keep the original
policy.xmlfor rollback.
How large should upload limits be?
Near what members actually send, and set at every layer, because each layer fails differently.
Layer | Setting | Default or note |
|---|---|---|
PHP |
| 2M, 8M and 20 as built-in defaults. |
nginx |
| Default 1m; larger requests get a 413 (nginx docs) |
Apache |
| Default 1073741824 bytes (1 GiB); in 2.4.53 and earlier it was 0, meaning unlimited (Apache docs) |
WordPress |
| Takes the lowest of the PHP values by default; filter it per role |
Plugin | Its own max file size and files-per-post options | Set them, then watch the real request in the Network tab |
The PHP manual documents a failure that confuses members: if the request body exceeds post_max_size, $_POST and $_FILES arrive empty, so the upload fails without a clear error. A per-role cap on top of the server limits is one filter:
// Members: at most 5 MB. Administrators keep the server limit. Checked on 15 Nov 2026.
add_filter(
'upload_size_limit',
function ( $size ) {
return current_user_can( 'manage_options' ) ? $size : min( $size, 5 * MB_IN_BYTES );
}
);TESTED with a 1 MB cap to make the branch visible: a member got 1,048,576 bytes and an administrator got the server limit of 2,097,152. For flood control, nginx’s limit_req_zone and limit_req (nginx request limiting) can rate-limit the upload route. Community plugins often upload through their own AJAX or REST routes instead of async-upload.php, so find the real route in the Network tab and limit that one.
If uploads start failing after you tighten anything, our guide to the seven real causes of the media upload HTTP error helps you tell a limit from a policy rejection.
Should uploads sit outside the webroot or in a private bucket?
For private files, yes. Photos in a public gallery are meant to be public, and a normal uploads folder is fine for them once the rules above are in place. Documents in a private group, ID checks, invoices or paid downloads are different: a file inside the webroot is reachable by anyone who learns the URL, whatever your plugin’s privacy setting says.
Two patterns work. The first keeps the files in a folder the web server does not publish and has WordPress check permission before the server hands them over. On nginx that is an internal location plus the X-Accel-Redirect header; the nginx documentation lists redirects from an upstream’s X-Accel-Redirect header as internal requests, which outside clients cannot reach directly (nginx internal docs).
# Checked on 15 Nov 2026 (nginx 1.30). The folder is NOT under the webroot.
location ^~ /private-files/ {
internal;
alias /var/private-uploads/;
}<?php
// Real code first checks that this member may read this file.
header( 'Content-Type: application/pdf' );
header( 'X-Accel-Redirect: /private-files/doc.pdf' );TESTED: a direct request to /private-files/doc.pdf returned 404, the PHP script without permission returned 403, and with permission it returned the file contents through nginx. Apache needs a different mechanism (mod_xsendfile is a third-party module), so on Apache or managed hosting ask what your host supports.
The second pattern is a private object-storage bucket with signed URLs. Amazon S3, for example, documents presigned URLs as time-limited access to private objects. They work as bearer tokens, so anyone holding the link can use it until it expires, and they expire when the credentials that signed them do, even sooner than the stated time (AWS presigned URLs). Keep expiry short and generate the URL only after your own permission check.
The cons: direct links stop working, so a CDN needs a rule to skip these paths, backups must include the second location, and a plugin that expects the normal uploads folder may not find the files. Check that your media plugin supports a private location first.
Should the web server open untrusted images at all?
The strongest option is that it does not. A separate worker, running as a restricted user with no access to WordPress files, can re-encode uploads from private storage and write the clean result back, so a library exploit lands on a machine that holds nothing valuable. Give it the same ImageMagick policy and its own memory and time limits. Browser-side processing in WordPress 7.1 helps performance but, as quoted above, is not a trust boundary. It is a bigger change than the rest, so do the controls above first.
What do community and media plugins change?
They add upload paths. A forum attachment plugin, a BuddyPress or BuddyNext-style media feature, a form builder and an avatar field can each register their own handler with their own type list, size limit and storage folder. None of them removes the need for the server rules above, and we do not recommend one for security. The practical test: as a member, upload a harmless test.php renamed to test.jpg and a text file through every form on the site, then check where each landed and what the server returns for it.
Common mistakes people report
These come from Trac tickets, support threads and our own tests, checked on 15 Nov 2026. The links go to the reports, paraphrased here.
- Expecting
ALLOW_UNFILTERED_UPLOADSto behave the same everywhere. In Trac ticket 54433 (November 2022) a contributor found that with the constant on, Add New accepted an EXE and a Linux installer while the media grid’s inline uploader blocked the installer. Test each surface and prefer a role-basedupload_mimeslist. - Forcing a MIME type for everyone to fix one rejected file. The stricter check in WordPress 5.0.1 rejected some CSV files (Trac ticket 45615), and core later added handling for common text types. A blanket
wp_check_filetype_and_extoverride skips the content check for every user. - An nginx deny rule that does nothing. In an EasyEngine forum thread a user dropped an
info.phpinto uploads and reported it still ran. Our test shows the usual cause: the rule sits after the PHP handler. - Putting
.htaccessrules on an nginx server. Nginx does not read the file. Prove protection with a test script, not by reading config. - Editing the wrong
policy.xml. Packages and ImageMagick versions each ship a copy, as the Doyensec write-up warns. Runidentify -list policywhere PHP runs and read the path it prints. - Raising upload limits in one place only. A bigger
upload_max_filesizedoes nothing ifpost_max_sizeor the server limit is lower, and the PHP manual notes the request then arrives with empty$_FILES.
What does a one-page checklist look like?
Run it each quarter and after any image-library advisory.
- Know: active editor, ImageMagick version, HEIC, SVG and MSL in the format list, libheif version, command-line PHP compared with web PHP.
- Patch: host confirms image-library updates and a PHP-FPM restart.
- Reduce: short
upload_mimesfor members, noALLOW_UNFILTERED_UPLOADS, SVG from staff or sanitised, policy in place. - Contain: script files refused in uploads and proven with a test file, limits aligned at every layer,
nosniffon uploads. - Protect: private files outside the webroot or in a private bucket.
- Prepare: a tested restore and a named contact at the host.
Questions people ask
Does a WordPress core or plugin update fix a bug in an image library?
No. The library comes from the operating system, a PHP extension or the host image, so its fix arrives as a system package. A core release can add checks around it, but not the library fix.
If my server has no libheif, am I exposed to this flaw?
The advisory is about libheif, so a server without it is not exposed to that flaw by that route. It says nothing about other libraries, and a host image update or a new plugin can bring libheif in later. Keep the inventory current.
Will an ImageMagick policy break my site?
It can if it is stricter than your real uploads, for example size limits that refuse big photos or an allow-list that drops PDF previews. Start from the documented example, test real phone photos on staging, and keep the original file for rollback.
If you would rather have someone inspect your image stack, write the policy and server rules, and test your upload paths on staging, our team does this as part of WordPress security audit and hardening. Send us your inventory from the first section and we will tell you what we would change first. For a wider list of habits that sit around this one, see our post on security mistakes experienced developers make.
Plugins we build and run
We maintain these ourselves, which is why we can support them on your site.
- BuddyNextThe self-hosted community engine for WordPress
- BuddyXFree community theme, Pro when you outgrow it
- ReignPremium community theme. Add pieces, build anything
- JetonomyCommunity forum and Q&A for WordPress
- EventonomyEvents and RSVPs for WordPress communities
- LearnomyCourses and learning communities on WordPress
- ListoraDirectories and listings your members can browse
- SnipShareCode sharing built for developer communities
- WB Ad ManagerAd placements that turn traffic into revenue
- WP Career BoardA job board your community actually uses
- WP Sell ServicesSell services with offers, orders, and payouts
- MediaVersePhotos, video, and media albums for members
- WB GamificationPoints, badges, and rewards that keep members active
- Product RoadmapPublic roadmaps with voting your users trust
Related Posts

LiteSpeed Cache Vulnerability CVE-2026-93389: Check Your Version and What Was Exposed

Freemius SDK Stored XSS: How to Find Every Bundled Copy on a Client Site (Anything Under 2.13.5)

