TechNews
Rack, Mongoose and DOMPurify flaws get CVEs this week, but the fixes have been out since November
GitHub's advisory database added CVEs this week for five Rack flaws, Mongoose sanitizer bypasses and two DOMPurify template bypasses. All were fixed between Nov 14 and Nov 22, so apps on current versions are safe.
Three of the most widely used web libraries have new CVE numbers this week: Rack, the interface under Ruby web frameworks such as Rails; Mongoose, the MongoDB library for Node.js; and DOMPurify, the HTML sanitizer for JavaScript. GitHub’s global advisory database published most of the advisories between Dec 2 and Dec 4.
The flaws themselves are not new. Each project fixed them between Nov 14 and Nov 22 and published its own advisory around the same time. Applications that took those releases are already protected. For the rest, the new CVEs will start to show up in dependency scanners now.
Rack: five flaws, fixed on Nov 20
Rack 3.2.9, 3.1.24 and 2.2.26 came out on Nov 20. The most serious of the five flaws, CVE-2026-142592, is rated high (7.5). Rack’s multipart parser looks up every charset value in an uploaded part’s headers, and for an unknown name Ruby searches every directory on its load path. Rack “does not remember the failure, and does not limit the number of charset parameters a part may carry”, so one request with thousands of them ties up the CPU. The advisory measured about 2.5 milliseconds per lookup on Linux in an application with 167 load-path entries. Rack 2.2 is not affected by this one.
The other four:
- CVE-2026-142591 (5.3): the query string parser allocates about 48 bytes of memory per space after an
&. With Rack’s default 4 MiB size limit and Puma’s default of five threads, “five concurrent requests reach about 1 GB,” the advisory says. - CVE-2026-142593 (5.3):
Rack::Directorycan list file names, sizes and dates outside its root folder when a symbolic link inside it is followed by... - CVE-2026-142590 (4.8): carriage returns and line feeds from multipart headers can still end up in parameter names, an incomplete fix for the earlier CVE-2026-26962.
- CVE-2026-142594 (3.7): Rack finds the multipart boundary differently from standard parsers, so a web application firewall and Rack can read the same request as different sets of fields.
Mongoose: sanitizer options with gaps
Mongoose, downloaded about 8.6 million times a week from npm, released 9.12.2, 8.24.10, 7.8.14 and 6.13.13 on Nov 16. Three of its four advisories are bypasses of options that developers turn on precisely to handle untrusted input:
- CVE-2026-142596 (7.5):
sanitizeProjectionis meant to stop a user-supplied projection from returning fields markedselect: false, “like password hashes and reset tokens”. Several projection forms got around it in Mongoose 8 and 9. - CVE-2026-142595 (6.5):
sanitizeFilter, which blocks query selector injection, refused only four top-level operators by name. Undocumented internal MongoDB operators such as$_internalSchemaXorlet an attacker “slip arbitrary query selectors like$neor$regexpastsanitizeFilter.” - CVE-2026-142597 (6.5): in Mongoose 5.13 through 7.x,
sanitizeProjectionpassed projection expressions to MongoDB unchanged. According to the advisory, an attacker who controls a projection could copy any field’s value into another key, or run server-side JavaScript with$functionif the database allows it, “which is the default”. In all versions, a failed$elemMatchcast silently dropped the whole projection and returned every field.
The fourth, CVE-2026-142608, is rated low and affects only Mongoose 6: a plain object with a forged _bsontype property passes the ObjectId check and can make a query reuse another request’s ID.
DOMPurify: two template bypasses
DOMPurify, with about 102 million npm downloads a week, fixed two bypasses of its SAFE_FOR_TEMPLATES option: CVE-2026-140391 in 3.4.18 on Nov 14 and CVE-2026-144292 in 3.5.0 on Nov 22. In both, the sanitizer returned markup without {{ or }}, which “becomes a live {{…}} expression as soon as it is assigned to innerHTML”. A template engine that then compiles the page, as tested with Vue 3 in-DOM templates and AngularJS 1.8.3, runs the attacker’s code.
Only applications that use SAFE_FOR_TEMPLATES with such a template engine are affected. Plain DOMPurify use is not.
What to do
| Package | Fixed versions | Released |
|---|---|---|
| rack (RubyGems) | 3.2.9, 3.1.24, 2.2.26 | Nov 20 |
| mongoose (npm) | 9.12.2, 8.24.10, 7.8.14, 6.13.13 | Nov 16 |
| dompurify (npm) | 3.5.0 | Nov 22 |
Newer releases of all three also include the fixes. If a scanner flags one of these CVEs in a project that is already on a fixed version, the alert can be closed.
Sources
- GHSA-58mf-c3jj-277p: Rack multipart parser searches the load path for every unknown part charsetAdvisory
- GHSA-f7cc-57h7-qrcg: Rack::QueryParser memory amplificationAdvisory
- GHSA-mhj6-xc86-54m8: Rack::Directory lists directories outside the rootAdvisory
- GHSA-r243-pfwh-7rpx: Rack::Multipart boundary extraction allows parser differentialsAdvisory
- GHSA-frgv-948x-h96g: Rack::Multipart::Parser keeps CRLF in parameter namesAdvisory
- GHSA-25v4-hrwm-qj9f: Mongoose sanitizeFilter bypass via internal query operatorsAdvisory
- GHSA-xfcm-rmv3-crmq: Mongoose sanitizeProjection bypass for select: false fieldsAdvisory
- GHSA-5554-xpxf-j3jr: Mongoose sanitizeProjection does not strip projection expressionsAdvisory
- GHSA-rxm2-55pg-68q6: Mongoose 6 forged _bsontype bypasses ObjectId castingAdvisory
- GHSA-qm7q-q8h9-jg8q: DOMPurify SAFE_FOR_TEMPLATES bypass (fixed in 3.4.18)Advisory
- GHSA-hrxw-jjj6-2g2j: DOMPurify SAFE_FOR_TEMPLATES bypass via nested form (fixed in 3.5.0)Advisory
- RubyGems: rack versionsRubyGems
- npm download counts for dompurifynpm
- npm download counts for mongoosenpm
Spotted a mistake? Report an error
Related coverage
More in Tech ›TechNews
Chrome update fixes 229 security bugs, with 68 credited to Anthropic researchers and OpenAI's Codex Security
TechNews
Laravel publishes eight security advisories in two weeks, two of them unauthenticated denial-of-service flaws
TechNews