rustsec-2026-0229
Vulnerability from osv_rustsec
Published
2026-08-01 12:00
Modified
2026-08-02 17:56
Summary
NIP-98 authorization parsing permits resource exhaustion
Details

The NIP-98 HTTP authorization parser Base64-decoded the complete authorization value and parsed the resulting JSON event without applying an application-level size limit. Both operations occurred before the event's signature and authorization fields could be validated.

An unauthenticated remote client could send an oversized Authorization: Nostr header to a server using this parser. Each request caused memory allocation and decoding and JSON parsing work proportional to the supplied value, allowing repeated requests to consume server memory and CPU. The impact depends on any lower HTTP header limit already enforced by the hosting server. The issue does not bypass NIP-98 authentication or disclose protected data.

The parser now rejects oversized encoded input before Base64 allocation and rejects decoded authorization events larger than 64 KiB before JSON parsing.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "denial-of-service"
        ],
        "cvss": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "nostr",
        "purl": "pkg:cargo/nostr"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "0.44.7"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "The NIP-98 HTTP authorization parser Base64-decoded the complete authorization value\nand parsed the resulting JSON event without applying an application-level size limit.\nBoth operations occurred before the event\u0027s signature and authorization fields could\nbe validated.\n\nAn unauthenticated remote client could send an oversized `Authorization: Nostr`\nheader to a server using this parser. Each request caused memory allocation and\ndecoding and JSON parsing work proportional to the supplied value, allowing repeated\nrequests to consume server memory and CPU. The impact depends on any lower HTTP header\nlimit already enforced by the hosting server. The issue does not bypass NIP-98\nauthentication or disclose protected data.\n\nThe parser now rejects oversized encoded input before Base64 allocation and rejects\ndecoded authorization events larger than 64 KiB before JSON parsing.",
  "id": "RUSTSEC-2026-0229",
  "modified": "2026-08-02T17:56:20Z",
  "published": "2026-08-01T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/nostr"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0229.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nostrdevkit/nostr/commit/fd69825a3aa83c4a99f0d620fafba66c765db96b"
    }
  ],
  "related": [],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "NIP-98 authorization parsing permits resource exhaustion"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…