{
  "id": "ku_6dcf3d307fd39c1b790949064bd2dbd2",
  "version": 1,
  "domains": [
    "mpp",
    "seller",
    "express",
    "http-signatures",
    "body-digest"
  ],
  "insight": {
    "summary": "Signed or digest-bound requests fail on your Express route, or the server answers 500, because a body parser consumed the raw bytes before mppx saw them.",
    "detail": "A content-digest, or a TAP signature covering it, is checked against the raw body bytes. Before 0.22.4 the Express adapter did not pass req.rawBody to mppx. In 0.22.4 it does, and a body that was parsed, dropped or already read throws instead of being checked, which the adapter answers with a 500.",
    "action": "Upgrade to mppx 0.22.4 or later and keep the raw body: use express.raw() on paid routes, or a body parser verify callback that sets req.rawBody."
  },
  "context": {
    "languages": [
      "typescript"
    ],
    "frameworks": [
      "mppx",
      "express"
    ],
    "pattern": "request-body-integrity"
  },
  "evidence": {
    "confidence": 0.8,
    "confirmations": 1,
    "first_observed": "2026-12-02T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "mppx behind Express: body digest or TAP signature fails because the body was already parsed",
    "neomorphic:signature": {
      "surface": "mpp",
      "provider": "mppx",
      "code": "express-parsed-body-digest",
      "versions": "fixed in mppx 0.22.4",
      "environment": "Express with express.json() or another body parser",
      "key": "mpp/mppx/express-parsed-body-digest"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Upgrade to mppx 0.22.4 or later and keep the raw body: use express.raw() on paid routes, or a body parser verify callback that sets req.rawBody.",
      "snippet": {
        "lang": "ts",
        "text": "import express from 'express';\nconst app = express();\n// keep the exact bytes for content-digest and signature checks (mppx 0.22.4 reads req.rawBody)\napp.use(express.json({ verify: (req: any, _res, buf) => { req.rawBody = buf; } }));\n// or, on paid routes only: app.post('/paid', express.raw({ type: '*/*' }), handler)"
      }
    },
    "neomorphic:fixed_in": "mppx 0.22.4",
    "neomorphic:sources": [
      {
        "kind": "release",
        "url": "https://github.com/wevm/mppx/releases/tag/mppx%400.22.4",
        "observed_at": "2026-12-02",
        "note": "mppx 0.22.4 changelog, read from the published npm package: the Express adapter now uses req.rawBody when a body parser keeps it, so body digests and signatures verify; TAP docs: on Express keep the raw body."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "seller",
    "neomorphic:observed_at": "2026-12-02",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
