CVE-2023-23684: WordPress WPGraphQL Plugin <= 1.14.5 is vulnerable to Server Side Request Forgery (SSRF)

Published Jun 30, 2023
·
Updated

Impact Users with capabilities to upload media (editors and above) are succeptible to SSRF (Server-Side Request Forgery) when executing the createMediaItem Mutation.

Authenticated users making GraphQL requests that execute the createMediaItem could pass executable paths in the mutations filePath argument that could give them unwarranted access to the server.

It's recommended to update to WPGraphQL v1.14.6 or newer. If you're unable to do so, below is a snippet you can add to your functions.php (or similar) that filters the createMediaItem mutation's resolver.

Patches

- v1.14.6 - https://github.com/wp-graphql/wp-graphql/pull/2840

Workarounds If you're unable to upgrade to v1.14.6 or higher, you should be able to use the following snippet in your functions.php to override the vulnerable resolver.

This snippet has been tested as far back as WPGraphQL v0.15

php addfilter( 'graphqlpreresolvefield', function( $nil, $source, $args, $context, \GraphQL\Type\Definition\ResolveInfo $info, $typename, $fieldkey, $field, $fieldresolver ) {

if ( $info->fieldName !== 'createMediaItem' ) { return $nil; }

$input = $args['input'] ?? null;

if ( ! isset( $input['filePath'] ) ) { return $nil; }

$uploadedfileurl = $input['filePath'];

// Check that the filetype is allowed $checkfile = wpcheckfiletype( $uploadedfileurl );

// if the file doesn't pass the check, throw an error if ( ! $checkfile['ext'] || ! $checkfile['type'] || ! wphttpvalidateurl( $uploadedfileurl ) ) { throw new \GraphQL\Error\UserError( sprintf( ( 'Invalid filePath "%s"', 'wp-graphql' ), $input['filePath'] ) ); }

$protocol = wpparseurl( $input['filePath'], PHPURLSCHEME );

// prevent the filePath from being submitted with a non-allowed protocols $allowedprotocols = [ 'https', 'http', 'file' ];

if ( ! inarray( $protocol, $allowedprotocols, true ) ) { throw new \GraphQL\Error\UserError( sprintf( ( 'Invalid protocol. "%1$s". Only "%2$s" allowed.', 'wp-graphql' ), $protocol, implode( '", "', $allowedprotocols ) ) ); }

return $nil;

}, 10, 9 );

References

- https://patchstack.com/database/vulnerability/wp-graphql/wordpress-wp-graphql-plugin-1-14-5-server-side-request-forgery-ssrf-vulnerability

Other sources

Server-Side Request Forgery (SSRF) vulnerability in WPGraphQL.This issue affects WPGraphQL: from n/a through 1.14.5.

Affected Software

3 affected componentsFixes available
composer/wp-graphql/wp-graphql<=1.14.5
1.14.6
WPGraphQL WPGraphQL WordPress<=1.14.5
Wpengine Wpgraphql Wordpress<=1.14.5

Remediation

Information

Update to 1.14.6 or a higher version.

Event History

Jun 30, 2023
Advisory Published
08:35 PM
Nov 13, 2023
CVE Published
via MITRE·03:01 AM
Data Sourced
via MITRE·03:01 AM
RemedyDescriptionSeverityWeakness
Data Sourced
via NVD·03:15 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this WordPress WPGraphQL vulnerability?

The vulnerability ID for this WordPress WPGraphQL vulnerability is CVE-2023-23684.

2

What is the impact of this vulnerability?

Users with capabilities to upload media are susceptible to Server Side Request Forgery (SSRF) when executing the createMediaItem Mutation.

3

Which version of WordPress WPGraphQL Plugin is affected by this vulnerability?

WordPress WPGraphQL Plugin version 1.14.5 is affected by this vulnerability.

4

How severe is this vulnerability?

This vulnerability has a severity score of 6.5, which is categorized as medium.

5

How can I fix this vulnerability?

To fix this vulnerability, update your WordPress WPGraphQL Plugin to version 1.14.6 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203