Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Incompatibility with @xmldom/xmldom 0.9.x: DOMParser.parseFromString throws on undefined mimeType

Aperta
#115 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@esetnik ci sta già lavorando.

Dal 8/5/2026.

  • #116 di @esetnik — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, node.js
Ambito
backend, security

Direzione di ricerca

Inizia da package.json e lib/utils.js:72, quindi esamina gli altri punti in cui viene chiamato DOMParser.parseFromString e rivedi le PR esistenti #76 e #101. Conferma la scelta della dipendenza e assicurati che il parsing XML non fallisca più con l’intervallo supportato di @xmldom/xmldom; verifica i test pertinenti del progetto, se disponibili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

[email protected] declares "@xmldom/xmldom": "^0.7.4" (package.json). @xmldom/[email protected] introduced a breaking change to DOMParser.parseFromString() — the mimeType argument is now required and an undefined value throws. Because latest on the npm registry now points at 0.9.10 (LTS is still 0.8.10), any consumer that uses an SCA tool / Renovate / Dependabot to widen the xmldom range past the existing 0.7.x CVE floor (CVE-2026-34601) lands on 0.9.x and breaks at runtime.

Repro

lib/utils.js:72 calls parseFromString with one argument:

```js
factoryForNode: function(xmlString) {
var doc = new DOMParser().parseFromString(xmlString);
// ...
}
```

Under @xmldom/[email protected]:

```
TypeError: DOMParser.parseFromString: the provided mimeType "undefined" is not valid.
at DOMParser.parseFromString (.../@xmldom/xmldom/lib/dom-parser.js:222:9)
at Object.factoryForNode (.../saml/lib/utils.js:72:37)
at Object. (.../saml/lib/saml11.js:12:31)
```

Why this matters now

  • The ^0.7.4 range made sense at the time of [email protected], but 0.7.x has CVE-2026-34601 (XML injection via unsafe CDATA serialization). Downstream consumers cannot stay on 0.7.x without violating their security policies, so they end up either pinning manually or using package-manager overrides — both of which are fragile.
  • There are two existing PRs that would address this — #76 (2021) and #101 (Snyk, 2024) — but both have sat untouched. #101 is mergeable with 0 comments after ~2 years.

Suggested fix

Bump @xmldom/xmldom to either:

  1. ^0.8.10 — matches current LTS, no API changes required (this is what #101 proposes).
  2. ^0.9.10 — matches current latest, requires updating factoryForNode (and any other call site) to pass an explicit mimeType ('text/xml' or 'application/xml').

Option 1 is the minimum safe bump and gets users out of the CVE floor; option 2 is the forward-looking fix.

Happy to send a PR if it would help unblock #101.


Reported during a transitive-dep regression on a downstream project. Filing here as a paper trail since neither prior PR mentions the 0.9.x compat break specifically.

[Written by Claude]

Lingua principale
JavaScript
Stelle
73
Fork
89
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di auth0/node-saml

Tutte le issue di auth0/node-saml

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.