Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@nano_kit/ssr

Latest version: v4.2.2

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: dangreen
47 Stars
0 Forks
20 Versions
1.6K Downloads
TypeScript Repo language

Scan summary

@nano_kit/ssr was last scanned on 24 Nov 2026 at version 4.2.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 20 versions; the latest 4 were published within 7 days (18–24 Nov 2026).
  • Findings: No rules fired in version 4.2.2.
  • Downloads: 1,570 downloads.

Versions

20 versions published
Versions and the rules that fired in each
VersionPublishedStatus
4.2.2 LATEST 24 Nov 2026 No rules fired
4.2.1 24 Nov 2026 No rules fired
4.0.0 20 Nov 2026 No rules fired
3.3.1 18 Nov 2026 Not shown
3.2.3 16 Nov 2026 Not shown

No rules fired in 4.2.2

Findings

Findings for v4.2.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 4.2.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@nano_kit/ssr

ESM-only package NPM version Dependencies status Build status Coverage status

A base package for server-side rendering capabilities in Nano Kit.

Installation

pnpm add @nano_kit/store @nano_kit/router @nano_kit/ssr
# or
npm install @nano_kit/store @nano_kit/router @nano_kit/ssr
# or
yarn add @nano_kit/store @nano_kit/router @nano_kit/ssr

Creating a Render Adapter

@nano_kit/ssr is a base package. To use it, you need to create a render adapter for your UI framework — just like @nano_kit/react-ssr does for React.

An adapter consists of three parts: a renderer, a client entry, and a Vite plugin.

1. Extend the Renderer

Subclass Renderer and implement the abstract renderToString method. The constructor must receive the framework-specific compose function from your router integration and pass it to super().

// src/renderer/index.js
import { Renderer } from '@nano_kit/ssr/renderer'
import { compose } from 'your-framework-router'

export class FrameworkRenderer extends Renderer {
  constructor(options) {
    super({ ...options, compose })
  }

  renderToString(data) {
    // render to string using your framework, wrapping with data.context
    const app = yourFrameworkRenderToString(data.context)

    return this.document(data, app)
  }
}

document builds the HTML document around the app: lang and dir go to <html>, the title and the other head tags to <head>, the app to the root element, followed by the script with the dehydrated state. The title and attribute values are escaped. Pass the head tags that your framework collects while rendering as the third argument.

Render only the app with your framework, since the client hydrates only the root element: a server tree with the document around the app would shift the ids built from the position in the tree, like the ones of React's useId.

2. Create the Client Entry

Wrap the base ready function, injecting the framework-specific router:

// src/client/index.js
import { router } from 'your-framework-router'
import { ready as baseReady } from '@nano_kit/ssr/client'

export * from '@nano_kit/ssr/client'

export function ready(options) {
  return baseReady({ ...options, router })
}

Also provide a default client template that the Vite plugin will use when the user does not supply their own:

// src/client.js
import { ROOT_ID, ready } from 'your-framework-ssr/client'
import { routes, pages } from 'virtual:app-index'

ready({ routes, pages }).then((context) => {
  // hydrate the app — framework-specific
  hydrateApp(document.getElementById(ROOT_ID), context)
})

And a default renderer template:

// src/renderer.js
import { FrameworkRenderer } from 'your-framework-ssr/renderer'
import { routes, pages } from 'virtual:app-index'

export const renderer = new FrameworkRenderer({
  base: import.meta.env.BASE_URL,
  manifestPath: import.meta.env.MANIFEST,
  routes,
  pages
})
3. Create the Vite Plugin

Pass a SsrPluginAdapter to the base SsrPlugin. The adapter tells the plugin where to find the default client and renderer template files:

// src/vite-plugin/index.js
import path from 'node:path'
import fs from 'node:fs/promises'
import SsrPlugin from '@nano_kit/ssr/vite-plugin'

const adapter = {
  // virtual module IDs used when resolving the templates
  clientPath: 'virtual-client.js',
  rendererPath: 'virtual-renderer.js',

  loadClient() {
    return fs.readFile(path.join(import.meta.dirname, '..', 'client.js'), 'utf-8')
  },
  loadRenderer() {
    return fs.readFile(path.join(import.meta.dirname, '..', 'renderer.js'), 'utf-8')
  }
}

export default function FrameworkSsrPlugin(options) {
  return SsrPlugin(options, adapter)
}

The plugin then handles building both the client bundle and the SSR renderer bundle automatically.

Usage in an app

Once the adapter package is published, end users configure their project like this:

// vite.config.js
import { defineConfig } from 'vite'
import ssr from 'your-framework-ssr/vite-plugin'

export default defineConfig({
  plugins: [ssr({ index: 'src/index.js' })]
})

Where src/index.js exports the app routes and pages definition:

// src/index.js
import { page, layout, loadable } from '@nano_kit/router'
import * as Layout from './Layout.js'

export const routes = { home: '/', about: '/about' }

export const pages = [
  layout(Layout, [
    page('home', loadable(() => import('./Home.js'))),
    page('about', loadable(() => import('./About.js')))
  ])
]

Documentation

For comprehensive guides, API reference, and integration patterns, visit the documentation website.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @nano_kit/ssr

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229