@vitejs/plugin-rsc@0.5.6

React Server Components (RSC) support for Vite.

  • latest version

    0.5.34

  • latest non vulnerable version

  • first published

    1 years ago

  • latest version published

    2 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @vitejs/plugin-rsc package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Allocation of Resources Without Limits or Throttling

    @vitejs/plugin-rsc is a React Server Components (RSC) support for Vite.

    Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via server function endpoints. An attacker can cause out-of-memory exceptions or induce excessive CPU usage by sending malicious FormData in an HTTP request.

    Note: Only React apps that use React Server Components are vulnerable.

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade @vitejs/plugin-rsc to version 0.5.26 or higher.

    <0.5.26
    • H
    Directory Traversal

    @vitejs/plugin-rsc is a React Server Components (RSC) support for Vite.

    Affected versions of this package are vulnerable to Directory Traversal via the /__vite_rsc_findSourceMapURL endpoint when processing HTTP requests containing a file:// URL in the filename query parameter. An attacker can access arbitrary files with sensitive information readable by the Node.js process by sending specially crafted requests.

    How to fix Directory Traversal?

    Upgrade @vitejs/plugin-rsc to version 0.5.8 or higher.

    <0.5.8
    • H
    Deserialization of Untrusted Data

    @vitejs/plugin-rsc is a React Server Components (RSC) support for Vite.

    Affected versions of this package are vulnerable to Deserialization of Untrusted Data due to unsafe deserialization of payloads from HTTP requests to Server Function endpoints. An attacker can cause the server process to enter an infinite loop and hang, preventing it from serving future HTTP requests by sending specially crafted payloads.

    Note:

    This is caused by an incomplete fix for CVE-2025-55184.

    Note:

    @vitejs/plugin-rsc vendors react-server-dom-webpack, which contained a vulnerability in versions prior to 19.2.3 - CVE-2025-67779

    How to fix Deserialization of Untrusted Data?

    Upgrade @vitejs/plugin-rsc to version 0.5.7 or higher.

    <0.5.7
    • M
    Exposure of Sensitive System Information to an Unauthorized Control Sphere

    @vitejs/plugin-rsc is a React Server Components (RSC) support for Vite.

    Affected versions of this package are vulnerable to Exposure of Sensitive System Information to an Unauthorized Control Sphere. An attacker can access the source code of any Server Function by sending a malicious HTTP request to a vulnerable Server Function.

    Notes:

    This is only exploitable if a Server Function exists that explicitly or implicitly exposes a stringified argument:

    'use server';
    
    export async function serverFunction(name) {
      const conn = db.createConnection('SECRET KEY');
      const user = await conn.createUser(name); // implicitly stringified, leaked in db
    
      return {
       id: user.id,
       message: `Hello, ${name}!` // explicitly stringified, leaked in reply
      }}
    

    An attacker may be able to leak the following:

    0:{"a":"$@1","f":"","b":"Wy43RxUKdxmr5iuBzJ1pN"}
    1:{"id":"tva1sfodwq","message":"Hello, async function(a){console.log(\"serverFunction\");let b=i.createConnection(\"SECRET KEY\");return{id:(await b.createUser(a)).id,message:`Hello, ${a}!`}}!"}
    

    Secrets hardcoded in source code may be exposed, but runtime secrets such as process.env.SECRET are not affected.

    The scope of the exposed code is limited to the code inside the Server Function, which may include other functions depending on the amount of inlining your bundler provides.

    Even if your app does not implement any React Server Function endpoints it may still be vulnerable if your app supports React Server Components.

    If your app’s React code does not use a server, your app is not affected by these vulnerabilities. If your app does not use a framework, bundler, or bundler plugin that supports React Server Components, your app is not affected by these vulnerabilities.

    For React Native users not using a monorepo or react-dom, your react version should be pinned in your package.json, and there are no additional steps needed.

    If you are using React Native in a monorepo, you should update only the impacted packages if they are installed: react-server-dom-webpack, react-server-dom-parcel, react-server-dom-turbopack. This is required to mitigate the security advisories, but you do not need to update react and react-dom so this will not cause the version mismatch error in React Native. See this issue for more information.

    Note:

    @vitejs/plugin-rsc vendors react-server-dom-webpack, which contained a vulnerability in versions prior to 19.2.3 - CVE-2025-55183

    How to fix Exposure of Sensitive System Information to an Unauthorized Control Sphere?

    Upgrade @vitejs/plugin-rsc to version 0.5.7 or higher.

    <0.5.7