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

@msm-platform/customer-sdk

Latest version: v0.5.4

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: sveittur
13 Versions
1.8K Downloads

Scan summary

@msm-platform/customer-sdk was last scanned on 24 Nov 2026 at version 0.5.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 13 versions; the latest 5 were published within 2 days (23 and 24 Nov 2026).
  • Findings: No rules fired in version 0.5.4.
  • Downloads: 1,804 downloads.

Versions

13 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.5.4 LATEST 24 Nov 2026 No rules fired
0.5.3 24 Nov 2026 No rules fired
0.5.2 24 Nov 2026 No rules fired
0.5.1 24 Nov 2026 Not shown
0.5.0 23 Nov 2026 Not shown

No rules fired in 0.5.4

Findings

Findings for v0.5.4. 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 0.5.4; other versions have their own rules, not their own score.

README

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

MSM customer SDK (@msm-platform/customer-sdk)

A typed client for MSM's customer API: sign-in, public business reads, reservations and bookings. Generated from the engine's customer contract with openapi-typescript, on top of openapi-fetch 0.17.0. Versions are 0.x until engine 1.0.0; a minor version can break. CHANGELOG.md in the package lists each version's changes.

npm install @msm-platform/customer-sdk

Two modes

Server mode is for your own server. Give it your application client's ID and secret: the SDK sends them as HTTP Basic (Authorization: Basic base64(clientId:clientSecret)) on every call, so there is no token to fetch, cache or renew. It refuses to run where window exists, so a secret bundled into browser code throws before any request.

import { createCustomerClient } from "@msm-platform/customer-sdk";

const msm = createCustomerClient({
  baseUrl: process.env.MSM_ENGINE_URL!, // https://… without a trailing /web
  clientId: process.env.MSM_CLIENT_ID!,
  clientSecret: process.env.MSM_CLIENT_SECRET!,
});

Proxy mode is for a browser or any code that must not hold the secret. Give it only a base URL and, if needed, a custom fetch, and put a proxy on your server in front of the engine that adds the credentials. MSM's customer screens (@msm-platform/customer-react) work this way, behind their server half on the partner's server.

const msm = createCustomerClient({ baseUrl: "/msm", fetch: myFetch });

Sessions

A customer signs in with a code sent by SMS. The session token is yours to store, for example in an HttpOnly cookie, and you pass it on each call that acts as the customer:

import { sessionHeaders } from "@msm-platform/customer-sdk";

// The Turnstile token the screens' widget gave the customer's browser, and the
// customer's address as your own trusted proxy reports it.
const { data: started } = await msm.POST("/web/identity/initiateLogin", {
  body: { phone: "+3545550004", botCheckToken, clientIp },
});
const { data: login } = await msm.POST("/web/identity/customerLogin", {
  body: { challenge: started!.challenge, code: "123456" },
});
// A phone with no customer yet gets a registration ticket instead of a session.
const session =
  login!.result === "session"
    ? login!
    : (
        await msm.POST("/web/identity/completeRegistration", {
          body: {
            registrationTicket: login!.registrationTicket,
            ...(login!.nameRequired && { name: "Kata" }),
          },
        })
      ).data;

const headers = sessionHeaders(session!.sessionToken);
const { data: reservation } = await msm.POST(
  "/web/businesses/{businessId}/reservations",
  { params: { path: { businessId } }, body: { eventId }, headers },
);
const { data: booking } = await msm.POST(
  "/web/businesses/{businessId}/reservations/{reservationId}/confirm",
  { params: { path: { businessId, reservationId: reservation!.id } }, headers },
);

The engine sends a code only after checking botCheckToken with the Turnstile widget MSM owns for your website (403 BotCheckFailed, or 503 BotCheckUnavailable when it cannot) and counting the request against clientIp (by default 5 code requests per address per 10 minutes, then 429 TooManyAttempts with Retry-After; 503 LimiterUnavailable when it cannot count). Never take clientIp from a header the customer can set, such as the leftmost X-Forwarded-For entry. Every phone gets a code, so the answer never tells whether it has an account. With the right code, customerLogin answers { result: "session", sessionId, sessionToken, expiresAt } for a customer, or { result: "registrationRequired", registrationTicket, nameRequired, registrationExpiresAt } when the phone has no customer yet. Then POST /web/identity/completeRegistration with { registrationTicket, name? } returns the session. Send name when nameRequired is true: without it the engine answers 422 NameRequired and the ticket stays usable for a retry with the name. A name sent when it isn't needed is ignored, and the person keeps theirs. The ticket is used once, with your client, within 10 minutes; otherwise it is 401 NotAuthenticated, as a wrong code is. POST /web/identity/logout with { sessionToken } ends a session of your client. Sign-in, registration and logout are on /web and need your client's credentials, so call them from server mode or through your proxy; /api is not for website clients. A reservation holds the seat or slot for a few minutes; confirming it makes the booking.

The same session reads the customer's own details, bookings and passes with every business of your partner, and ends all their sessions with your client:

const { data: me } = await msm.GET("/web/me", { headers });
const { data: upcoming } = await msm.GET("/web/me/bookings", {
  params: { query: { period: "upcoming" } },
  headers,
});
const { data: passes } = await msm.GET("/web/me/memberships", { headers });
await msm.PATCH("/web/me", { body: { name: "Kata Jónsdóttir" }, headers });
await msm.DELETE("/web/me/sessions", { headers });

Each booking carries its business's name, its event and cancellableUntil and lateCancellationFrom; each pass its creditsRemaining, null when unlimited. Phone and email are read-only.

Errors

Every non-2xx response throws CustomerApiError with status, the engine's stable code, message, retryAfterSeconds (from Retry-After on 429 and 503), issues (the failed input checks on ValidationFailed, each {path, message} with path a JSON Pointer into the request such as /body/eventId), the parsed body and the original response. isCustomerApiError(error, method, path) is true only for that operation's errors and narrows code to the codes the contract declares for it, so TypeScript checks the cases you handle:

import { isCustomerApiError } from "@msm-platform/customer-sdk";

try {
  await msm.POST("/web/businesses/{businessId}/reservations", request);
} catch (error) {
  if (isCustomerApiError(error, "post", "/web/businesses/{businessId}/reservations")) {
    switch (error.code) {
      case "EventFull":
      case "SlotTaken":
        return "Pick another time";
    }
  }
  throw error;
}

Until the engine declares its codes per operation, code is a string; the cases then compile without the check.

The SDK never retries a request: a 401 throws, and the next call sends the same credentials. Writes are not idempotent yet: retry a reservation only when you know the first attempt did not reach the engine.

Next.js server example

examples/customer-nextjs in the repository is a Next.js App Router site, the partner starter. It serves MSM's customer screens for sign-in and the customer's account, and its own pages use the SDK in server mode with the session the screens signed in (read from their encrypted HttpOnly cookie): the business's availability, and booking (reserve, then confirm) with server actions. The SDK and the secret live only in server code (lib/msm.ts):

// lib/msm.ts, imported only by server components and server actions
export const msm = createCustomerClient({
  baseUrl: process.env.MSM_ENGINE_URL!,
  clientId: process.env.MSM_CLIENT_ID!,
  clientSecret: process.env.MSM_CLIENT_SECRET!,
});

// app/actions.ts
("use server");
export async function book(form: FormData) {
  const sessionToken = (await cookies()).get("msm-session")?.value;
  const headers = sessionHeaders(sessionToken!);
  const { data: reservation } = await msm.POST(
    "/web/businesses/{businessId}/reservations",
    {
      params: { path: { businessId } },
      body: { eventId: String(form.get("eventId")) },
      headers,
    },
  );
  await msm.POST(
    "/web/businesses/{businessId}/reservations/{reservationId}/confirm",
    {
      params: { path: { businessId, reservationId: reservation!.id } },
      headers,
    },
  );
}

To run it against a local engine, see the example's README.

Inside msm-platform

pnpm generate writes src/generated/api.ts from the customer contract, contracts/openapi/customer.json, and pnpm generate:check fails when it is stale. Never edit it by hand. Publishing is manual and only Daníel does it: docs/runbooks/customer-sdk.md. A pull request that changes this package or the customer contract adds an entry to its CHANGELOG.md, or says Web impact: none in its description.

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 @msm-platform/customer-sdk

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

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

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?

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Frame 2085668439 (1)
Group 1261154229