See how statamic compares to other vendors in security performance
DISPUTED A Code Execution vulnerability exists in Statamic Version through 3.2.26 via SettingsController.php. NOTE: the vendor indicates that there was an error in publishing this CVE Record, and that all parties agree that the affected code was not used in any Statamic product.
Impact On front-end forms with an asset upload field, PHP files crafted to look like images may be uploaded regardless of mime validation rules. This only affects forms using the "Forms" feature and not just any arbitrary form. This does not affect the control panel.
Patches It has been patched in 3.4.13 and 4.33.0.
Impact
An attacker may leverage a vulnerability in the password reset feature to capture a user's token and reset the password on their behalf.
The attacker must know the email address of a valid account on the site, and the actual user must blindly click the link in their email even though they didn't request the reset.
Patches
This has been fixed in 6.3.3 and 5.73.10.
The /users endpoint in Statamic Core before 2.11.8 allows XSS to add an administrator user. This can be exploited via CSRF. Stored XSS can occur via a JavaScript payload in a username during account registration. Reflected XSS can occur via the /users PATHINFO.
Impact
Authenticated Control Panel users may under certain conditions obtain elevated privileges without completing the intended verification step. This can allow access to sensitive operations and, depending on the user’s existing permissions, may lead to privilege escalation.
Patches This has been fixed in 6.4.0.
Statamic framework before 2.6.0 does not correctly check a session's permissions when the methods from a user's class are called. Problematic methods include reset password, create new account, create new role, etc.
Impact
Similar to another advisory, certain additional PHP files crafted to look like images may be uploaded regardless of mime type validation rules. This affects front-end forms using the "Forms" feature, and asset upload fields in the control panel.
Patches It has been patched in 3.4.14 and 4.34.0.
Impact Stored XSS vulnerability in content titles allow authenticated users with content creation permissions to inject malicious JavaScript that executes when viewed by higher-privileged users.
Malicious user must have an account with control panel access and content creation permissions.
This vulnerability can be exploited to allow super admin accounts to be created.
Patches This has been fixed in 6.2.3.
Impact Stored XSS vulnerability in svg and icon related components allow authenticated users with appropriate permissions to inject malicious JavaScript that executes when viewed by higher-privileged users.
Patches This has been fixed in 5.73.11 and 6.4.0.
Impact
Stored XSS vulnerability in SVG asset reuploads allows authenticated users with asset upload permissions to bypass SVG sanitization and inject malicious JavaScript that executes when the asset is viewed.
Patches
This has been fixed in 5.73.14 and 6.7.0.
Impact
When Glide image manipulation is used in insecure mode (which is not the default), the image proxy can be abused by an unauthenticated user to make the server send HTTP requests to arbitrary URLs—either via the URL directly or via the watermark feature. That can allow access to internal services, cloud metadata endpoints, and other hosts reachable from the server.
Patches
This has been fixed in 5.73.11 and 6.4.0.
Impact
HTML files crafted to look like jpg files are able to be uploaded, allowing for XSS.
This affects:
- front-end forms with asset fields without any mime type validation - asset fields in the control panel - asset browser in the control panel
Additionally, if the XSS is crafted in a specific way, the "copy password reset link" feature may be exploited to gain access to a user's password reset token and gain access to their account. The authorized user is required to execute the XSS in order for the vulnerability to occur.
Patches
In versions 4.46.0 and 3.4.17, the XSS vulnerability has been patched, and the copy password reset link functionality has been disabled. (Users may still trigger password reset emails.)
Credits
Statamic thanks Niklas Schilling (discovery, analysis, coordination) from the SEC Consult Vulnerability Lab (https://www.sec-consult.com/) for responsibly reporting the identified issues and working with us as we addressed them.
Impact
Stored XSS vulnerability in html fieldtypes allow authenticated users with field management permissions to inject malicious JavaScript that executes when viewed by higher-privileged users.
Patches
This has been fixed in 6.3.2 and 5.73.9.
Impact
Manipulating query parameters on Control Panel and REST API endpoints, or arguments in GraphQL queries, could result in the loss of content, assets, and user accounts.
The Control Panel requires authentication with minimal permissions in order to exploit. e.g. "view entries" permission to delete entries, or "view users" permission to delete users, etc.
The REST and GraphQL API exploits do not require any permissions, however neither are enabled by default. In order to be exploited, they would need to be explicitly enabled with no authentication configured, and the specific resources enabled too.
Sites that enable the REST or GraphQL API without authentication should treat patching as critical priority.
Patches
This has been fixed in 5.73.20 and 6.13.0.
Impact An authenticated control panel user with access to Antlers-enabled inputs may be able to achieve remote code execution in the application context. That can lead to full compromise of the application, including access to sensitive configuration, modification or exfiltration of data, and potential impact on availability.
Exploitation is only possible where Antlers runs on user-controlled content—for example, content fields with Antlers explicitly enabled (requiring permission to configure fields and to edit entries), built-in config that supports Antlers such as Forms email notification settings (requiring configuration permission), or third-party addons that add Antlers-enabled fields to entries (for example, the SEO Pro addon). In each case the attacker must have the relevant control panel permissions.
Patches This has been fixed in 5.73.11 and 6.4.0. If developers use addons that depend on Statamic, ensure that a patched version of Statamic is running.
Impact HTML files crafted to look like images may be uploaded regardless of mime validation. This is only applicable on front-end forms using the "Forms" feature containing an assets field, or within the control panel which requires authentication.
Patches It has been patched on 3.4.15 and 4.36.0.
Impact
The fix for GHSA-4jjr-vmv7-wh4w was incomplete. It addressed the issue in the query builder, but the same protection was not applied to in-memory collection sorting. Manipulating sort parameters could result in the loss of content and assets.
This requires a front-end template that passes request input into a tag's sort parameter. It is not exploitable by default — a template would need to be explicitly set up to sort by a visitor-controlled value.
Patches
This has been fixed in 5.73.23 and 6.20.0.
Alt Redirect: Potential Authentication Bypass by Spoofing through query-string stripping logic flaw
Impact User email addresses were included in responses from the user fieldtype’s data endpoint for control panel users who did not have the “view users” permission.
Patches This has been fixed in 5.73.11 and 6.4.0.
Impact A control panel user with access to Antlers-enabled fields could access sensitive application configuration values by inserting config variables into their content.
Patches This has been fixed in 5.73.16 and 6.7.2.
Impact The markdown preview endpoint could be manipulated to return augmented data from arbitrary fieldtypes. With the users fieldtype specifically, an authenticated control panel user could retrieve sensitive user data including email addresses, encrypted passkey data, and encrypted two-factor authentication codes.
Patches This has been fixed in 5.73.16 and 6.7.2.
Statamic CMS exposes two-factor recovery codes through dynamic Antlers rendering
Impact The external URL detection used for redirect validation on unauthenticated endpoints could be bypassed, allowing users to be redirected to external URLs after actions like form submissions and authentication flows.
Patches This has been fixed in 5.73.16 and 6.7.2.
Impact
The user:resetpasswordform tag could render user-input directly into HTML without escaping, allowing an attacker to craft a URL that executes arbitrary JavaScript in the victim's browser.
Patches
This has been fixed in 5.73.16 and 6.7.2.
Antlers sanitizer cannot effectively sanitize malicious SVG
Summary The SVG tag does not sanitize malicious SVG. Therefore, an attacker can exploit this vulnerability to perform XSS attacks using SVG, even when using the sanitize function.
Details Regarding the previous discussion mentioned here, it has been identified that the default blacklist in the FilesFieldtypeController (located at this link) only blocks certain file extensions such as php, php3, php4, php5, and phtml. This allows a malicious user to upload a manipulated SVG file disguised as a social media icon, potentially triggering an XSS vulnerability.
PoC Screenshot !image
PoC 1. Create new Global set, let's say "Settings" 2. Create a "Grid" field in Blueprint (named: social), then add somefields Name (text), URL (text) and Icon (Assets) in the section Fields. 3. When calling the social setting in the footer.antlers.html, remember to sanitize {{ settings:social }} <a href="{{ $url }}" class="ml-4" aria-label="{{ $name }}" rel="noopener"> {{ svg :src="icon" class="h-6 w-6 hover:text-hot-pink" | sanitize }} </a> {{ /settings:social }} 4. Upload the malicious SVG image, here is the code: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <text x="20" y="35">Statamic</text> <foreignObject width="500" height="500"> <iframe xmlns="http://www.w3.org/1999/xhtml" src="javascript:confirm(document.cookie);" width="400" height="250"/> </foreignObject> </svg>
Impact Since the social media icon is displayed in the footer layout, any user can view it, potentially leading to the execution of XSS.
Suggestions to Mitigate or Resolve the Issue: Sanitize when outputing the svg. This vulnerability caused by unsanitized File::get() when retrieving the SVG, it is crucial to sanitize the SVG when outputting it. The issue can be found in the following file: https://github.com/statamic/cms/blob/f806b6b007ddcf066082eef175653c5beaa96d60/src/Tags/Svg.php#L36-L40.
It is highly recommended to implement proper sanitization measures to ensure the security of the SVG content. One effective approach is to utilize a reliable package, such as https://github.com/darylldoyle/svg-sanitizer ,which provides comprehensive SVG sanitization capabilities.
So the code becomes: php use enshrined\svgSanitize\Sanitizer;
if (File::exists($file)) { $sanitizer = new Sanitizer(); $dirtySVG = File::get($file);
$svg = $sanitizer->sanitize($dirtySVG); break; }
Reference - https://github.com/gogs/gogs/security/advisories/GHSA-ff28-f46g-r9g8 - https://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d/ - https://blog.nintechnet.com/wordpress-elementor-plugin-fixed-svg-xss-protection-bypass-vulnerability/
Impact
Stored XSS in the control panel color mode preference allows authenticated users with control panel access to inject malicious JavaScript that executes when a higher-privileged user impersonates their account.
Patches
This has been fixed in 6.6.2.
Impact Authenticated Control Panel users could view entry revisions for any collection with revisions enabled, regardless of whether they had the required collection permissions. This bypasses the authorization checks that the main entry controllers enforce, exposing entry field values and blueprint data.
Users could also create entry revisions without edit permission, though this only snapshots the existing content state and does not affect published content.
Patches This has been fixed in 5.73.16 and 6.7.2.
Statamic 2.10.3 allows XSS via First Name or Last Name to the /users URI in an 'Add new user' request.
Impact Users without permission to view assets are able are able to download them and view their metadata.
Logged-out users and users without permission to access the control panel are unable to take advantage of this.
Patches This has been fixed in 5.73.6 and 6.2.5.
Impact
Low-privileged Control Panel users could create taxonomy terms by submitting requests to the field action processing endpoint with attacker-controlled field definitions. This bypasses the authorization checks enforced on the standard taxonomy term creation endpoint.
Patches
This has been fixed in 5.73.14 and 6.7.0.