{"vuln_id":"CVE-2026-59975","aliases":["GHSA-3h63-w8jq-rrf2"],"description":"SharpIppNext: Unbounded IPP Document Stream Buffering Leads to Denial of Service","published_at":"2026-11-18T21:18:00.500000Z","modified_at":"2026-11-19T20:43:02Z","first_seen_at":"2026-11-21T19:15:19.482011Z","severity":"high","severity_source":"nvd","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-400"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00623,"epss_percentile":0.50789,"nvd_status":"Received","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-59975"},"matched_alias":null,"items":[{"id":2398,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-3h63-w8jq-rrf2 / CVE-2026-59975: SharpIppNext: Unbounded IPP Document Stream Buffering Leads to Denial of Service","summary":"SharpIppNext: Unbounded IPP Document Stream Buffering Leads to Denial of Service\n\n### Summary\n\nSharpIppNext's `IppProtocol.ReadIppRequestAsync()` unconditionally copies the entire attacker-supplied IPP document payload into an unbounded `MemoryStream` with no size limit. Because this behavior is enabled by default (`ReadDocumentStream = true`) and the official server documentation shows `HttpContext.Request.Body` being passed directly to `ReceiveRequestAsync()` without authentication, an unauthenticated remote attacker can exhaust the server process's memory by sending an arbitrarily large IPP request body, causing an Out-Of-Memory (OOM) condition and denial of service.\n\n> [!NOTE]\n> This vulnerability only affects server-side implementations (using `SharpIppServer` to parse incoming IPP requests). It does not affect client-side implementations using `SharpIppClient` or client-side request construction.\n\n### Details\n\nThe vulnerable sink is in `SharpIpp/Protocol/IppProtocol.cs`:\n\n```csharp\n// IppProtocol.cs:39 — enabled by default\npublic bool ReadDocumentStream { get; set; } = true;\n\n// IppProtocol.cs:466–470 — no size cap on the copy\nif (ReadDocumentStream)\n{\nmessage.Document = new MemoryStream();\nawait reader.BaseStream.CopyToAsync(message.Document); // unbounded\nmessage.Document.Seek(0, SeekOrigin.Begin);\n}\n```\n\nThe full call chain from the public API to the vulnerable sink:\n\n1. `docs/Content/Server/index.md:6–11` — Official server example passes `context.Request.Body` (unauthenticated) to `sharpIppServer.ReceiveRequestAsync(inputStream)`.\n2. `SharpIpp/ISharpIppServer.cs:78` — Public API declaration: `Task\nReceiveRequestAsync(Stream stream, ...)`.\n3. `SharpIpp/SharpIppServer.cs:62–67` — `ReceiveRequestAsync(Stream)` overload delegates to `ReceiveRawRequestAsync(stream)`.\n4. `SharpIpp/SharpIppServer.cs:52–58` — `ReceiveRawRequestAsync` calls `_ippProtocol.ReadIppRequestAsync(stream, ...)`.\n5. `SharpIpp/Protocol/IppProtocol.cs:466–470` — `ReadIppRequestAsync` copies all remaining bytes after the IPP attribute section into a `new MemoryStream()` with no upper bound.\n\nThe existing validator (`IppRequestMessageValidator.ValidateStringLengthLimitsRule`, `IppRequestMessageValidator.cs:260`) only checks IPP attribute string/octet lengths after parsing; it does not constrain the document stream buffered at step 5.\n\nDynamic confirmation (Phase 2): a Docker-based PoC server built directly from the v4.0.2 source (commit `185343e`) was sent a 100 MB IPP document payload. The server responded `docLength=104857600`, confirming all 100 MB were buffered into a `MemoryStream` with no rejection.\n\n### PoC\n\n**1. Build and start the vulnerable server**\n\n```bash\n# From the repository root (build context: parent of vuln-001/)\ndocker build -t sharpipp-dos-poc -f vuln-001/Dockerfile \\\nreports/pypiAi_973_danielklecha__SharpIppNext/\n\ndocker run --rm -d -p 8631:8631 --name sharpipp-dos-server sharpipp-dos-poc\n```\n\nThe PoC server (`Program.cs`) uses the default `SharpIppServer` (which uses `IppProtocol` with `ReadDocumentStream\n\nAffected packages: nuget:SharpIppNext\nPatched: SharpIppNext 4.1.0","url":"https://github.com/advisories/GHSA-3h63-w8jq-rrf2","published_at":"2026-11-19T20:43:01Z","updated_at":"2026-11-19T20:43:02Z","fetched_at":"2026-11-21T19:15:18.416806Z","severity":"high","cvss_score":7.5,"epss":0.00623,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"SharpIppNext","vuln_id":"CVE-2026-59975","vuln_ids":["CVE-2026-59975","GHSA-3H63-W8JQ-RRF2"],"tags":["ghsa","nuget","CWE-400"],"cluster_id":2225,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2398","html":"https://vulnwatch.ve1ve2.com/item/2398"}},{"id":8217,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-59975: SharpIppNext is a .NET Standard library for building Internet Printing Protocol clients and servers. Prior to 4.1.0, server-side SharpIppNext implementations u…","summary":"SharpIppNext is a .NET Standard library for building Internet Printing Protocol clients and servers. Prior to 4.1.0, server-side SharpIppNext implementations using SharpIppServer.ReceiveRequestAsync or SharpIppServer.ReceiveRawRequestAsync pass incoming data to IppProtocol.ReadIppRequestAsync in SharpIpp/Protocol/IppProtocol.cs, where ReadDocumentStream is enabled by default and the remaining document body is copied with CopyToAsync into a MemoryStream without a size limit. An unauthenticated remote client can send an arbitrarily large IPP document body, exhausting process memory and causing an out-of-memory failure or service termination. Client-only implementations using SharpIppClient are not affected. This issue is fixed in version 4.1.0.\n\nReferences:\nhttps://github.com/danielklecha/SharpIppNext/commit/30e236e35f415d5172e178c75030cafd53d150fe\nhttps://github.com/danielklecha/SharpIppNext/commit/fe161eb3d6d114aaf9b2f1e42dea55b097257281\nhttps://github.com/danielklecha/SharpIppNext/releases/tag/v4.1.0\nhttps://github.com/danielklecha/SharpIppNext/security/advisories/GHSA-3h63-w8jq-rrf2\nhttps://github.com/danielklecha/SharpIppNext/security/advisories/GHSA-3h63-w8jq-rrf2","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59975","published_at":"2026-11-18T21:18:00.500000Z","updated_at":"2026-11-18T21:18:00.500000Z","fetched_at":"2026-11-21T19:15:31.484008Z","severity":"high","cvss_score":7.5,"epss":0.00623,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-59975","vuln_ids":["CVE-2026-59975","GHSA-3H63-W8JQ-RRF2"],"tags":["CWE-400"],"cluster_id":2226,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8217","html":"https://vulnwatch.ve1ve2.com/item/8217"}}]}