Skip to content

Mitigations put in place for SSRF in @opennextjs/cloudflare #23068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025

Conversation

penalosa
Copy link
Contributor

Summary

Screenshots (optional)

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@penalosa penalosa marked this pull request as ready for review June 17, 2025 14:12
@penalosa penalosa requested review from a team as code owners June 17, 2025 14:12
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-cloudflare-one


**Package dependency update:** Pull request [cloudflare/workers-sdk#9608](https://github.com/cloudflare/workers-sdk/pull/9608) to create-cloudflare (c3) to use the fixed version of the Cloudflare adapter for Open Next. The patched version of create-cloudflare has been published as `create-cloudflare@2.49.3`.

In addition to the automatic mitigation deployed on Cloudflare's platform, we encourage affected users to upgrade to `@opennext/cloudflare` v1.3.0 and use the [`remotePatterns`](https://nextjs.org/docs/pages/api-reference/components/image#remotepatterns) filter in Next config if they need to allow-list external urls with images assets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here for automatic?

Copy link
Contributor

github-actions bot commented Jun 17, 2025

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just a comment about "automatic" but you will know better if relevant as a native speaker. We also use the same wording in the GH CVE.

@@ -0,0 +1,33 @@
---
title: SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the changelog entry should reflect the changes put in place, more than just a notification that a vuln was identified, perhaps:

Suggested change
title: SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint
title: Mitigation for SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint

@@ -0,0 +1,33 @@
---
title: SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint
description: A Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package, which has been automatically mitigated for all existing deployments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe more emphasis on the mitigation than the vuln?

Suggested change
description: A Server-Side Request Forgery (SSRF) vulnerability was identified in the @opennextjs/cloudflare package, which has been automatically mitigated for all existing deployments.
description: Mitigations have been put in place for all existing and future deployments of sites with the Cloudflare adapter for Open Next in response to an identified Server-Side Request Forgery (SSRF) vulnerability in the @opennextjs/cloudflare package

@@ -0,0 +1,33 @@
---
title: SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Suggested change
title: SSRF vulnerability in opennextjs-cloudflare via /_next/image endpoint
title: SSRF vulnerability in @opennextjs/cloudflare proactively mitigated for all Cloudflare customers


The following mitigations have been put in place:

**Server side updates** to Cloudflare's platform to restrict the content loaded via the `/_next/image` endpoint to images. The update automatically mitigates the issue for all existing and any future sites deployed to Cloudflare using the affected version of the Cloudflare adapter for Open Next
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest referencing this more directly in first 2-3 sentences

@kennyj42
Copy link
Contributor

Nit: Please try and name changelog PRs after what the feature is vs. "next change log." It makes it a lot harder to know what this is for otherwise.

Co-authored-by: Brendan Irvine-Broque <birvine-broque@cloudflare.com>
@penalosa
Copy link
Contributor Author

penalosa commented Jun 17, 2025

Nit: Please try and name changelog PRs after what the feature is vs. "next change log." It makes it a lot harder to know what this is for otherwise.

Apologies, I could've been more clear. This is a branch for a changelog relating to the "Open Next" adapter

@penalosa penalosa changed the title Open next changelog Mitigations put in place for SSRF in @opennextjs/cloudflare Jun 17, 2025
@penalosa penalosa enabled auto-merge (squash) June 17, 2025 16:09
@penalosa penalosa merged commit 73e56b5 into production Jun 17, 2025
10 checks passed
@penalosa penalosa deleted the penalosa/next-changelog branch June 17, 2025 16:19
sdnts pushed a commit to sdnts/cloudflare-docs that referenced this pull request Jul 24, 2025
…lare#23068)

* Open next changelog

* Update src/content/changelog/workers/2025-06-17-open-next-ssrf.mdx

Co-authored-by: Brendan Irvine-Broque <birvine-broque@cloudflare.com>

* updates

* updates

---------

Co-authored-by: ANT Bot <116369605+workers-devprod@users.noreply.github.com>
Co-authored-by: Brendan Irvine-Broque <birvine-broque@cloudflare.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.