Skip to content

NodeJS 24.17 CVE-2026-48931 fix affecting node-fetch - Premature close errorΒ #34651

Description

@balint-backmaker

πŸ“œ Issue Labels

  • Please familiarize yourself with the issue labels used in this project: LABELS.md

πŸ”Ž Search Terms

cloudflare-access-provider
catalog-client
node-fetch
24.17
fetch
Premature close

πŸ—ƒοΈ Project Area

Auth

πŸ”— External Integration

Other

πŸ“ Description & Context

Context

We had a minor incident on our backstage instance, starting yesterday.
We isolated the incident to the nodejs change from 24.16 to 24.17 (done automatically via docker)

This broke our login for our users and had to revert the NodeJS version to 24.16 and that fixed the issue.

Suspect node-fetch change

This breaks the cloudflare-access-provider plugin because we use fetch without fetch options, therefore likely defaulting to keep-alive: false causing issues.

Node 24.17 changed keep-alive socket behavior (CVE-2026-48931 / nodejs/node@be7e719c3f) which appears to disrupt outgoing connections to Cloudflare.

Workaround

Until the team finds the right solution, if you're hit by the issue, you can pin your nodejs to 24.16 or 22.22 (since the same CVE is applied in 22.23)

πŸ‘ Expected Behavior

I would expect to be able to upgrade to NodeJS 24.17 and use the latest version of the provider and logins keep working for my users when accessing through cloudflare.

Here's two uses of node-fetch that have no fetch options for them therefore no retries are applied when making these calls:

I am sadly not a NodeJS expert, please take my assertion with some criticism. πŸ™‚

πŸ“¦ Reproduction Repo

No response

πŸ₯Ύ Reproduction steps

  1. use cloudflare-access-provider: @backstage/plugin-auth-backend-module-cloudflare-access-provider v0.4.15
  2. use catalog-client: @backstage/catalog-client: ^1.15.1
  3. use NodjeJS 24.17
  4. Configure cloudflare login for your instance
  5. Try to log in or load a previous entity page you had
    Then expect error logs like so:
Invalid response body while trying to fetch http://localhost:7007/api/catalog/entities?fields=kind,metadata.name,metadata.namespace,spec.lifecycle,spec.definition,spec.owner,spec.system&limit=500&filter=kind%3DAPI%2Cspec.type%3Dopenapi&offset=0: Premature close
Request failed with status 500 Invalid response body while trying to fetch http://localhost:7007/api/permission/authorize: Premature close
catalog.entity-fetch Invalid response body while trying to fetch http://localhost:7007/api/permission/authorize: Premature close

Have you read the Code of Conduct?

Are you willing to submit PR?

No, I don't have time to work on this right now

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions