GHSA-cfh4-7wq9-6pgg is a medium-severity (CVSS 6.5) Server-Side Request Forgery (SSRF) vulnerability in wp-graphql/wp-graphql. A fix is available for wp-graphql/wp-graphql — see the affected versions and patch details below.
WPGraphQL Plugin vulnerable to Server Side Request Forgery (SSRF)
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-cfh4-7wq9-6pgg plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
wp-graphql/wp-graphqlReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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
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
add_filter( 'graphql_pre_resolve_field', function( $nil, $source, $args, $context, \GraphQL\Type\Definition\ResolveInfo $info, $type_name, $field_key, $field, $field_resolver ) {
if ( $info->fieldName !== 'createMediaItem' ) {
return $nil;
}
$input = $args['input'] ?? null;
if ( ! isset( $input['filePath'] ) ) {
return $nil;
}
$uploaded_file_url = $input['filePath'];
// Check that the filetype is allowed
$check_file = wp_check_filetype( $uploaded_file_url );
// if the file doesn't pass the check, throw an error
if ( ! $check_file['ext'] || ! $check_file['type'] || ! wp_http_validate_url( $uploaded_file_url ) ) {
throw new \GraphQL\Error\UserError( sprintf( __( 'Invalid filePath "%s"', 'wp-graphql' ), $input['filePath'] ) );
}
$protocol = wp_parse_url( $input['filePath'], PHP_URL_SCHEME );
// prevent the filePath from being submitted with a non-allowed protocols
$allowed_protocols = [ 'https', 'http', 'file' ];
if ( ! in_array( $protocol, $allowed_protocols, true ) ) {
throw new \GraphQL\Error\UserError( sprintf( __( 'Invalid protocol. "%1$s". Only "%2$s" allowed.', 'wp-graphql' ), $protocol, implode( '", "', $allowed_protocols ) ) );
}
return $nil;
}, 10, 9 );
References
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | wp-graphql/wp-graphql | all versions | 1.14.6composer require wp-graphql/wp-graphql:^1.14.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wp-graphql/wp-graphql, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update wp-graphql/wp-graphql to 1.14.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-cfh4-7wq9-6pgg is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-cfh4-7wq9-6pgg can be triaged on real exposure rather than presence alone.
Tailored to GHSA-cfh4-7wq9-6pgg. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-cfh4-7wq9-6pgg in your dependencies?
O3 Security finds GHSA-cfh4-7wq9-6pgg across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.