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

@sasjs/server

Latest version: v8.18.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: allanbowe, krishna-acondy, yury_shkoda
23 Stars
3 Forks
178 Versions
38.9K Downloads
TypeScript Repo language

Scan summary

@sasjs/server was last scanned on 28 Nov 2026 at version 8.18.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 178 versions; the latest 5 were published within 2 days (27 and 28 Nov 2026).
  • Findings: 1 rule fired in version 8.18.0 (2 instances: 2 medium). The score describes this version only.
  • Downloads: 38,890 downloads.

Versions

178 versions published
Versions and the rules that fired in each
VersionPublishedStatus
8.18.0 LATEST 28 Nov 2026 1 rule fired
8.17.0 28 Nov 2026 1 rule fired
8.16.0 28 Nov 2026 1 rule fired
8.15.2 27 Nov 2026 Not shown
8.15.1 27 Nov 2026 Not shown

Rules fired in 8.18.0: 1

Findings

2 Medium

Findings for v8.18.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.

Function reached through a chain of indirect calls

The code obtains a function through a computed property lookup whose key is not a plain literal, calls it, and then calls the value it returns. Obfuscated loaders use this double indirection to reach the Function constructor without its name appearing in the source. This is a code shape, not evidence of intent, and is shown to help review obfuscated code.

MEDIUM
Checking access…

🔒 Create a free account to see all 2 findings with descriptions and instance counts

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

README

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

SASjs Server

All Contributors

SASjs Server provides a NodeJS wrapper for calling the SAS binary executable. It can be installed on an actual SAS server, or locally on your desktop. It provides:

  • Virtual filesystem for storing SAS programs and other content
  • Ability to execute Stored Programs from a URL
  • Ability to create web apps using simple Desktop SAS
  • REST API with Swagger Docs

One major benefit of using SASjs Server alongside other components of the SASjs framework such as the CLI, Adapter and Core library, is that the projects you create can be very easily ported to SAS 9 (Stored Process server) or Viya (Job Execution server).

SASjs Server is available in two modes - Desktop (without authentication) and Server (with authentication, and a database)

Installation

Two channels - the npm package and the standalone executable. Both read the same environment variables and serve the same API.

npm

Run the latest release without installing it:

npx @sasjs/server

Or install it once and run sasjs-server from then on:

npm install -g @sasjs/server
sasjs-server

Requires Node 22 or later. Useful where Node is already managed by the platform, and the only channel that runs on arm64 (Apple Silicon, Graviton, a Pi), because the standalone executables are built for x64 only.

Three things to know before choosing it:

  • Pin the version for a deployment. The command above resolves latest on every run, so a restart becomes a silent upgrade. Install a specific release instead - they are listed on the npm page - so the release you tested is the one that runs.
  • .env is read from the working directory. dotenv.config() is relative to where the process starts, so run it from the project directory you want the server to own (that directory also gets the ./sasjs_root). Under npx the package itself lives in an evictable ~/.npm/_npx/<hash> cache, so an .env placed there would be lost - it belongs beside the command, not the code.
  • It starts in desktop mode, the single-user mode. The RUN_AS check still refuses to run as root, so install it under the account that should own the SAS sessions rather than starting it with sudo.

Installing the package runs no install script, so it makes no network call of its own.

Standalone executable

Download the relevant package from the releases page, or fetch it programmatically (linux):

curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
unzip linux.zip

Then launch ./api-linux (on windows, double click api-win.exe - no administrative privileges are needed) and answer the two prompts, unless the ENV vars are set:

  • Location of your sas.exe / sas.sh executable
  • Path to a filesystem location for Stored Programs and temporary files

Deployment options

  • Embedded - the server's pieces are also used inside other SASjs tooling, such as the VS Code extension, and the mock backend runs in the browser for front-end development without a server at all.

There is no container image. The previous ghcr.io/sasjs/server image could not carry SAS - the licence does not permit redistribution - so it could only serve the js and py runtimes, and it needed a SAS installation mounted from the host to do the work the server exists for. It has been withdrawn along with the Cloudron packaging built on it.

That also withdraws the OS-layer scan the image pipeline ran: nothing in the remaining pipeline looks for CVEs in a bundled runtime, because there is no bundled runtime. The js and py interpreters a deployment uses are the ones on its own host, and patching them is part of that host's maintenance.

Configuration

Every setting is an environment variable, read at startup from the environment or from the .env file beside the executable. The full reference - core settings, listener configuration, analytics run times, the SAS options, the server-mode settings, and the LDAP and OIDC providers - lives with the rest of the documentation:

https://server.sasjs.io/docs/settings/

That page is built from docs/ in this repository and served by the build it describes - it is the Docs screen at /docs, which frames it - so the reference and the binary that reads the settings cannot drift apart.

Persisting the Session

The server runs in the foreground and never detaches, so it lives exactly as long as whatever started it - a terminal, a task, a unit. Give it a supervisor for anything other than a workstation session. The full recipes (systemd, launchd, Windows Task Scheduler, WinSW/NSSM, pm2, nohup) are in the deployment docs.

The short version:

  • Linux and macOS: a systemd unit with Restart=on-failure, or a launchd plist with KeepAlive. Set the working directory, because .env and sasjs_root resolve against it.
  • Windows: Task Scheduler at logon, or a WinSW/NSSM service. Set the working directory explicitly - a task's default is C:\Windows\System32.
  • pm2: pm2 start sasjs-server --name sasjs-server, then pm2 startup (which prints a command to run once) and pm2 save. Without those two a reboot starts nothing, and pm2 startup does nothing on Windows - use pm2-installer, Task Scheduler or a service wrapper there.
  • nohup ./api-linux > server.log 2>&1 & plus disown: survives the terminal and nothing else.
  • npx: a launcher, not a supervisor. It exits with the terminal, so for anything supervised install globally and hand sasjs-server to the supervisor.

Whichever you pick, capture stderr. The process exits 1 on a configuration error and on an unhandled rejection, and that line is the diagnosis; a console window that closes takes it with it.

Stopping the server

SIGTERM and SIGINT stop the server in two stages. Listeners stop accepting first, and in-flight requests get up to 5 seconds to finish. Then every session the server is holding is ended: a SAS session waiting for work is handed an endsas; program so SAS terminates itself, and a session that is still running gets 2 seconds to finish, then SIGTERM with 1 second, then SIGKILL with 1 second. The three phases are added, not nested, so no phase can borrow another's time. A session's folder is removed only after its process has gone - if a process survives both signals (uninterruptible I/O), the folder is left in place and an error is logged, because that folder is where the process is still writing.

The worst case is therefore 9 seconds - 5 for the listener close plus 4 for the drain - so give a supervisor 10 seconds before it escalates. That gap is deliberate: a supervisor's SIGKILL cannot be caught, so a shutdown cut short at that point would orphan the very processes this ends, and a SAS session left behind keeps a licence seat busy until its own 15 minute idle ceiling expires. A stop with nothing in flight is far quicker than the ceiling; measure one before raising the value:

  • pm2 waits 1600ms by default, which is shorter than the listener close alone: set kill_timeout: 10000 in the ecosystem file, or start with --kill-timeout 10000.
  • docker waits 10 seconds by default, which is already the right value: --stop-timeout 10 (or stop_grace_period: 10s in a compose file) makes it explicit.
  • systemd waits 90 seconds by default, so a unit needs no change; TimeoutStopSec=10 is still worth setting explicitly.

GET /SASjsApi/info answers without authentication and is the probe to use.

Server Version

GET /SASjsApi/info reports the release that produced the running build in version, as v3.2.2 (4a26a3d) - the tag and the commit - and the interface stamps that value in the corner of every screen, the login screen included, so a screenshot names the build it came from. The value comes from buildInfo.generated.ts, which the build writes from the release tag (SASJS_SERVER_VERSION when the release workflow sets it) or from git describe; a build made by hand reports dev.

The demonstration site

npm run mock:build builds the same interface as a static site - no server, no SAS binary - and writes it to sasjsbuild/mock. A service worker answers /SASjsApi from @sasjs/api, the package this server answers with, over a drive that ships with the site (mock/drive.json). It is published to https://server.sasjs.io by .github/workflows/mock-site.yml, from this repository, on every push to main or by hand.

  • sasjs/sasjsconfig.json is the mock target the CLI builds against; mock/build.mjs runs the docs, the web bundle and the CLI in order and writes what a static host needs: 404.html and .nojekyll, the API's Swagger UI and its assets together at /api-assets/ - /api is the interface's screen, which frames that page (the stylesheet and bundle are generated from swagger-ui-dist, which is why the site workflow installs the API's dependencies: the build asks the API for them, and fails naming any that are missing), and a folder per screen (/studio/index.html and the rest) so a deep link answers 200 rather than rendering with a 404 status.
  • npm run mock:serve serves the built site the way GitHub Pages does, including the fallback that makes a reload on /studio work.
  • The Apps screen lists what the drive has published, so the site publishes two: Macro Dash and the Minimal Seed App. mock/apps.mjs names each app's release and packages its deploy document (server.json from the release zip) onto the drive - the web folder the App Stream serves, plus the JS programs beside it and the data those programs read, so the demo has a backend - and writes the registry at /.sasjs/apps.json. Each app opens at /app/<name>/.
  • The drive also carries, under /code, the libraries a visitor arrives with, each read at build time so the tree describes today: the SASjs macro core from npm's latest, the SAS Packages framework from its default branch, and Paul Canals' toolbox from its default branch - a page of documentation per macro plus the test script that calls it, since the toolbox's macro bodies ship only as a compiled catalogue in its release. What each tree was is written beside the site as code-macro-core.txt, code-sas-packages.txt and code-toolbox.txt. The toolbox tree carries its own .sasjslint, from mock/toolbox.sasjslint: the strictest rules the library meets without a single diagnostic, because the drive root's rules are a SASjs project's and would mark essentially the whole library.
  • What runs is JavaScript. The demo ships a recording of one SAS session, mock/sas-transcript.json - a real run's log, listing and webout, with the licensee and site line removed - and a CLI carrying sasjs/cli#1575 answers the demo's .sas program with it. Until a CLI release carries that support the program is refused, with "runTime" must be one of [js], and every other .sas program is refused either way: a demo that invented a session for every program would be teaching the wrong thing.
  • The site is a browser host: no accounts, no private data, and the seeded identity is the package's demo admin. Nothing here is a security boundary, which is why a demo is all it should ever serve.

Documentation

The documentation site - the pages published at https://server.sasjs.io/docs/ - lives in docs/ in this repository and is built with MkDocs Material:

  • docs/pages/ holds the pages, and docs/mkdocs.yml the navigation, theme and plugins.
  • docs/requirements.txt pins the toolchain. It is Python, so it is installed separately from the interface's dependencies.
  • The build copies the site into the web build, at web/build/documentation, which the server serves at /documentation. The interface's Docs screen is the route /docs, which frames those pages: the header and tabs stay, and the address bar carries the page being read. The copy therefore describes the build that carries it - the pages and the interface are never a release apart.
  • npm run docs:build builds the site, npm run docs:serve serves it with live reload at http://127.0.0.1:8000, and npm run docs:check runs the two content checks. The scripts use .venv-docs/bin/python when that venv exists and the ambient python3 otherwise, so activating it is optional.

A development build does not need any of that: the Docs tab says the build carries no documentation and links to the published site. To see the pages while working on them, install the toolchain once (python3 -m venv .venv-docs && .venv-docs/bin/pip install -r docs/requirements.txt) and run npm run docs:serve - the script picks up that venv by itself.

Two checks run in CI, both against this checkout rather than a clone:

  • docs/scripts/check-server-docs.mjs fails when a page is missing from the nav, or an endpoint or setting it names is not in the code. docs/pages/swagger.yaml is generated by the docs build rather than committed, so there is no copy to drift.
  • docs/scripts/check-external-calls.mjs fails when the built site fetches anything from another origin - the pages are read offline and on air-gapped hosts.

A change that touches only docs/ publishes the site and does not cut a release.

Initial Credentials

The following credentials can be used for the initial connection to SASjs/server. It is highly recommended to change these on first use.

  • CLIENTID: clientID1
  • USERNAME: secretuser
  • PASSWORD: secretpassword

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

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 @sasjs/server

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

PolinRider Returns
Research

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

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229