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

superstatic

Latest version: v11.1.0

Overview

Last scanned
14 Oct 2026
Published
14 Oct 2026
npm package Publisher: firebase-ops, google-wombot, mbleigh
1,115 Stars
89 Forks
2 Versions
12.6M Downloads
TypeScript Repo language

Scan summary

superstatic was last scanned on 14 Oct 2026 at version 11.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 14 Oct 2026.
  • Findings: No rules fired in version 11.1.0.
  • Downloads: 12,630,268 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
11.1.0 LATEST 14 Oct 2026 No rules fired
11.0.1-bk-test-release.0 14 Oct 2026 No rules fired

No rules fired in 11.1.0

Findings

Findings for v11.1.0. 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 11.1.0; other versions have their own rules, not their own score.

Known vulnerabilities

2 CVEs · last 27 Jul 2018

0 CRITICAL 2 HIGH 0 MEDIUM 0 LOW

Versions

  • ≥ 5.0.2
  • > 5.0.1, < 5.0.2 1 HIGH
  • ≤ 5.0.1 2 HIGH

Vulnerabilities

README

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

Superstatic NPM Module NPM download count GitHub Actions Workflow Status

Superstatic is an enhanced static web server that was built to power. It has fantastic support for HTML5 pushState applications, clean URLs, caching, and many other goodies.

Documentation

  • Installation
  • Usage
  • Configuration
  • API
    • Middleware
    • Server
  • Providers
    • Authoring Providers
  • Run Tests
  • Changelog
  • Contributing

Installation

Superstatic should be installed globally using npm:

For use via CLI

$ npm install -g superstatic

For use via API

npm install superstatic --save

Usage

By default, Superstatic will simply serve the current directory on port 3474. This works just like any other static server:

$ superstatic

You can optionally specify the directory, port and hostname of the server:

$ superstatic public --port 8080 --host 127.0.0.1

Configuration

Superstatic reads special configuration from a JSON file (either superstatic.json or firebase.json by default, configurable with -c). This JSON file enables enhanced static server functionality beyond simply serving files.

public: by default, Superstatic will serve the current working directory (or the ancestor of the current directory that contains the configuration json being used). This configuration key specifies a directory relative to the configuration file that should be served. For example, if serving a Jekyll app, this might be set to "_site". A directory passed as an argument into the command line app supercedes this configuration directive.

cleanUrls: if true, all .html files will automatically have their extensions dropped. If .html is used at the end of a filename, it will perform a 301 redirect to the same path with .html dropped.

All paths have clean urls

{
  "cleanUrls": true
}

rewrites: you can specify custom route recognition for your application by supplying an object to the routes key. Use a single star * to replace one URL segment or a double star to replace an arbitrary piece of URLs. This works great for single page apps. An example:

{
  "rewrites": [
    {"source":"app/**","destination":"/application.html"},
    {"source":"projects/*/edit","destination":"/projects.html"}
  ]
}

redirects: you can specify certain url paths to be redirected to another url by supplying configuration to the redirects key. Path matching is similar to using custom routes. redirects use the 301 HTTP status code by default, but this can be overridden by configuration.

{
  "redirects": [
    {"source":"/some/old/path", "destination":"/some/new/path"},
    {"source":"/firebase/*", "destination":"https://www.firebase.com", "type": 302}
  ]
}

Route segments are also supported in the redirects configuration. Segmented redirects also support custom status codes (see above):

{
  "redirects": [
    {"source":"/old/:segment/path", "destination":"/new/path/:segment"}
  ]
}

In this example, /old/custom-segment/path redirects to /new/path/custom-segment

headers: Superstatic allows you to set the response headers for certain paths as well:

{
  "headers": [
    {
      "source" : "**/*.@(eot|otf|ttf|ttc|woff|font.css)",
      "headers" : [{
        "key" : "Access-Control-Allow-Origin",
        "value" : "*"
      }]
    }, {
      "source" : "**/*.@(jpg|jpeg|gif|png)",
      "headers" : [{
        "key" : "Cache-Control",
        "value" : "max-age=7200"
      }]
    }, {
      "source" : "404.html",
      "headers" : [{
        "key" : "Cache-Control",
        "value" : "max-age=300"
      }]
    }]
  }
}

trailingSlash: Have full control over whether or not your app has or doesn't have trailing slashes. By default, Superstatic will make assumptions for on the best times to add or remove the trailing slash. Other options include true, which always adds a trailing slash, and false, which always removes the trailing slash.

{
  "trailingSlash": true
}

i18n: Internationalized content can be served based on accept-language or x-country-code headers.

Imagine a setup with the following files:

- public/
  - index.html
  - i18n/
    - fr_ca/
      - index.html
    - ALL_ca/
      - index.html
    - fr/
      - index.html

With i18n enabled, when a request is received for /index.html with the accept-language header set to fr (and no x-country-code), the content at public/i18n/fr/index.html will be returned as a response.

If accept-language: fr and x-country-code: ca are passed, the content at public/i18n/fr_ca/index.html will be returned for /index.html.

For more information about how content is resolved when using i18n, see the Firebase Hosting documentation of the feature.

{
  "i18n": {
    "root": "/intl"
  }
}

API

Superstatic is available as a middleware and a standalone Connect server. This means you can plug this into your current server or run your own static server using Superstatic's server.

Middleware
var superstatic = require('superstatic')
var connect = require('connect');

var app = connect()
    .use(superstatic(/* options */));

app.listen(3000, function() {

});
superstatic([options])

Instantiates middleware. See an example for detail on real world use.

  • options - Optional configuration:
    • fallthrough - When false, render a 404 page from within Superstatic rather than calling through to the next middleware. Defaults to true.
    • config - A file path to your application's configuration file (see Configuration) or an object containing your application's configuration. If an object is provided, it will be merged into existing config in a superstatic.json.
    • protect - Adds HTTP basic auth. Example: username:password
    • env- A file path your application's environment variables file or an object containing values that are made available at the urls /__/env.json and /__/env.js. See the documentation detail on environment variables.
    • cwd - The current working directory to set as the root. Your application's public configuration option will be used relative to this.
    • compression - An option which controls superstatic's response compression. Pass in a standard compression(req, res, next) Express middleware function to override the default compression behavior (for example, require shrink-ray to enable advanced compression schemes such as brotli, or require node.js' stock compression middleware yourself to change the compression quality and caching behavior). Any other truthy value will default to the stock node.js middleware.
Server
var superstatic = require('superstatic').server;

var app = superstatic(/* options */);

var server = app.listen(function() {

});

Since Superstatic's server is a barebones Connect server using the Superstatic middleware, see the Connect documentation on how to correctly instantiate, start, and stop the server.

superstatic([options])

Instantiates a Connect server, setting up Superstatic middleware, port, host, debugging, compression, etc.

  • options - Optional configuration. Uses the same options as the middleware, plus a few more options:
    • port - The port of the server. Defaults to 3474.
    • host or hostname - The hostname of the server. Defaults to localhost.
    • errorPage - A file path to a custom error page. Defaults to Superstatic's error page.
    • debug - A boolean value that tells Superstatic to show or hide network logging in the console. Defaults to false.
    • compression - A boolean value that tells Superstatic to serve gzip/deflate compressed responses based on the request Accept-Encoding header and the response Content-Type header. Defaults to false.
    • gzip [DEPRECATED] - A boolean value which is now equivalent in behavior to compression. Defaults to false.

Providers

Superstatic reads content from providers. The default provider for Superstatic reads from the local filesystem. Other providers can be substituted when initializing Superstatic:

superstatic({
  provider: require('superstatic-someprovider')({
    provider: 'options'
  })
});
Authoring Providers

Implementing a new provider is quite simple. You simply need to create a function that takes a request and pathname and returns a Promise. The Promise should:

  1. Resolve null when content isn't found (i.e. a 404 response).
  2. Resolve with a metadata object as described below when content is found.
  3. Reject when an error occurs in the content-fetching process.

The metadata object returned by a provider needs the following properties:

  • stream: A readable stream for the content.
  • size: The length of the content.
  • etag: (optional) a content-unique string such as an MD5 hash computed from the content
  • modified: (optional) a Date object for when the content was last modified

A simple in-memory store provider can be found at lib/providers/memory.js in this repo as a simple reference example of a provider.

Note: The pathname will be URL-encoded. You should make sure your provider properly handles files with non-standard characters (spaces, unicode, etc).

Run Tests

In superstatic module directory:

npm install
npm test

Contributing

We LOVE open source and open source contributors. If you would like to contribute to Superstatic, please review our contributing guidelines before you jump in and get your hands dirty.

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 superstatic

References

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

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229