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

modelapp

Latest version: v0.1.0

Overview

Last scanned
16 Nov 2026
Published
16 Nov 2026
npm package Publisher: andrea_zago
2 Versions
330 Downloads

Scan summary

modelapp was last scanned on 16 Nov 2026 at version 0.1.0. Risk score 45 of 100 (medium). High-severity rules fired.

  • Releases: 2 versions, all published on 16 Nov 2026.
  • Findings: 1 rule fired in version 0.1.0 (1 high). The score describes this version only.
  • Downloads: 330 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 16 Nov 2026 1 rule fired
0.0.0-stage 16 Nov 2026 Not shown

Rules fired in 0.1.0: 1

Findings

1 High

Findings for v0.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.

Encoded data placed in a DNS lookup

A DNS lookup command (nslookup, dig or host) takes its query name from a subshell that first encodes the data, for example with base64 or xxd. Encoding the name turns a lookup into a way to send data to the nameserver of the queried domain. Ordinary diagnostic lookups have no encoding step.

HIGH
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

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

README

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

modelapp

The Model App Protocol (MAP) SDK. MIT. You write one typed object, defineApp({ entities, actions, pages, fragments, agents, … }). It becomes a JSON manifest for workspace hosts and a plain, conformant MCP server for ChatGPT, Claude and any MCP client. Spec: docs/map/spec.md.

npm i modelapp zod

ESM JavaScript with its type declarations, Node 20+; zod 4 is a peer dependency, next (15+) an optional one. Not on npm yet: docs/map/RELEASE.md says how the tarball is made, checked and (after the owner's yes) published.

Entry What
modelapp defineApp, AuthError, SqlStore, MemoryStore, types. Framework-agnostic (app.fetch(request))
modelapp/next toNextHandlers, withModelApp, modelAppRewrites; embedProxy, getEmbedCaller for embedded pages (next is an optional peer dependency)
modelapp/node listen(app): the app on Node's own HTTP server
modelapp/testing testClient(app): JSON-RPC to app.fetch with dev tokens
modelapp/spec checkApp, formatReport: the conformance checks
CLI npx modelapp init [dir] [--dry-run]; npx modelapp check <url> [--token …] (or MODELAPP_TOKEN)

Next.js: npx modelapp init

In an existing App Router app, npx modelapp init writes the three files below and wraps next.config. It also puts a random local bearer in .env.local (MODELAPP_LOCAL_TOKEN), which the generated resolve accepts only when NODE_ENV isn't production. It never overwrites a file, prints what it can't edit safely, and --dry-run writes nothing. Then npm run dev and npx modelapp check http://localhost:3000 --token <MODELAPP_LOCAL_TOKEN>. See docs/map/quickstart.md.

Next.js: three files

// next.config.ts
import { withModelApp } from "modelapp/next"

export default withModelApp({ /* your config: your rewrites, in any shape, are kept */ })
// app/api/modelapp/[...path]/route.ts
import { toNextHandlers } from "modelapp/next"
import { app } from "@/modelapp"

export const { GET, POST, DELETE, OPTIONS } = toNextHandlers(app)
// modelapp.ts
import { defineApp } from "modelapp"

export const app = defineApp({
  name: "crm",
  title: "CRM",
  version: "1.0.0",
  auth: {
    resource: `${process.env.MODELAPP_PUBLIC_URL}/mcp`,
    authorizationServers: [`${process.env.MODELAPP_PUBLIC_URL}/api/auth`],
    resolve: async (token, request, { resource }) => {
      // Verify the token of your own sign-in (signature, expiry, aud === resource), then say who is calling.
      return { installation: "org-id", person: { id: "user-id", name: "Ada" }, permissions: ["deals.view"] }
    },
  },
  // permissions, entities (get/list on any database, scoped by ctx.installation), actions, pages…
})
  • withModelApp adds beforeFiles rewrites to the route for /mcp, /.well-known/modelapp.json and the OAuth metadata paths (oauth-protected-resource, oauth-authorization-server and openid-configuration, each bare or with a path).
    • It keeps the app's own rewrites, in any shape: an array, an object, a sync or async function, or a config function.
    • It refuses basePath (the well-known paths must be at the root of the host) and trailingSlash: true (which redirects /mcp to /mcp/).
  • toNextHandlers hands app.fetch each request at its public address.
    • The mount is taken off (/api/modelapp/mcp → /mcp). A rewritten request arrives with its source path, and that path is kept.
    • Responses, SSE included, pass through unbuffered. Nothing is kept between requests, so it runs on serverless.
    • Options: mount (default /api/modelapp, the same value in both functions) and publicUrl.
    • Leave defineApp's path unset: the mount does that job.

Embedded pages (/embed/*)

A page url: "/embed/board" is a page of your site that hosts frame. The frame is cross-site, so the viewer is signed in with a one-minute, single-use ticket the host asks for (modelapp_embed) and posts into the frame; the app answers with a Secure; HttpOnly; SameSite=None; Partitioned cookie for that page's path (spec §5.1).

// modelapp.ts
defineApp({ …, embed: { frameAncestors: ["https://app.clegra.com", "https://chatgpt.com"], secret: process.env.MODELAPP_EMBED_SECRET } })

// proxy.ts
export const proxy = embedProxy(app)            // POST /embed/_ticket; frame-ancestors on every /embed response
export const config = { matcher: "/embed/:path*" }

// app/embed/board/page.tsx
const caller = await getEmbedCaller(app, "board") // null: no ticket, expired, or a top-level visit

app.embed.exchange(request) and app.embed.caller(page, request) are the same, framework-neutral; app.fetch answers POST <path>/_ticket too (modelapp/node).

Public URL behind proxies and on Vercel

The public origin is publicUrl, else MODELAPP_PUBLIC_URL (an origin only, like https://crm.example.com), else what the request says (x-forwarded-host / x-forwarded-proto, else host). A client can send those headers, so in production set MODELAPP_PUBLIC_URL and auth.resource. Tokens are only accepted for auth.resource. Without auth.resource in production, every request answers 500 misconfigured. On Vercel, preview deployments have other hosts: give each environment its own value.

Auth: write auth.resolve yourself

The app verifies its own access tokens: those its sign-in (better-auth, Clerk, Auth0, WorkOS, …) issues to MCP clients.

  • auth.resolve(token, request, { resource }) checks the signature, the expiry and that the audience is exactly resource (RFC 8707). For a JWT that is jwtVerify from jose with the issuer's JWKS.
  • It returns { installation, person, permissions } (the tenant comes from the token, never from a parameter). It returns null, or throws AuthError, to refuse.
  • auth.authorizationServers names your authorization server in the protected-resource metadata.
  • auth.serve(request) can answer its RFC 8414 metadata at the root.

Recipes for better-auth, Clerk, Auth0 and WorkOS: docs/map/auth.md.

Dev sign-in (auth.dev) answers loopback callers only. A Next route handler can't know the caller's address: x-forwarded-for is whatever the client sent. So toNextHandlers refuses an app with auth.dev. Locally, use init's bearer (MODELAPP_LOCAL_TOKEN) or your own sign-in, or run the app with listen from modelapp/node.

Kinds and references across apps

kind: "person" on an entity and .meta({ as: "email", filter: true }) on a field say what the record is in the words every app shares (spec §3.1; the vocabulary is spec/kinds.json, written with npm run schema). Key filters (email, vatID, gtin, uid) reach list normalised and must be matched exactly. ref.kind("organization") holds the URI of a record in any app (spec §3.2). Both are optional: apps without them are unchanged.

Tests

npm test            # core + modelapp/next unit tests
npx tsx --test "spec/src/**/*.test.ts"   # modelapp init (fixture projects in temp folders)
npm run test:next   # test/fixture with next dev (port 3942), then next build + next start (3943); modelapp check through the rewrites
npm run typecheck
npm run build       # dist/ (git-ignored): what the tarball ships; npm pack builds it itself
npm run pack:check  # slow: npm pack, then a fresh Next.js app outside the repository with the tarball (docs/map/RELEASE.md)

In this repository the package exports its TypeScript source: the examples, Clegra and the tests import it through the workspace with no build step. npm pack builds dist/ and packs a package.json whose exports point there (scripts/prepack.mjs; scripts/postpack.mjs puts the repository's back).

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 modelapp

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

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (1)
Research

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

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?

Frame 2085668439 (1)
Group 1261154229