Niska

KaTeX: Existing prototype pollution can bypass trust restrictions

  • Ujawniono: 05.10.2026
  • Aktualizacja: 11.10.2026 10:22

Impact

KaTeX can act as a read-side prototype pollution gadget in applications where Object.prototype has already been polluted, or where an attacker can influence the prototype of the renderer options object. (KaTeX does not enable said prototype pollution. This advisory applies when combining KaTeX with other vulnerable software that allows for prototype pollution.)

Affected versions may treat inherited properties from Object.prototype as renderer options, internal setting metadata, or namespace entries. In particular, an inherited trust value will be treated as though the application explicitly enabled trusted rendering, rather than using the documented default of false.

With attacker-controlled mathematical expressions, this can produce links capable of user-interaction cross-site scripting or load attacker-selected external resources. Exploitation requires the consuming application to insert KaTeX output into a web page without a separate sanitizer. (KaTeX does not execute scripts merely by rendering an expression.)

Other inherited settings can alter rendering behavior or resource limits. Inherited setting metadata can affect how defaults and supplied options are processed, while inherited namespace properties can be mistaken for defined macros or other internal values.

Patches

Upgrade to KaTeX v0.18.2 to remove this vulnerability.

Workarounds

  • Address any prototype-pollution vulnerability in the application or its dependencies.
  • delete Object.prototype.trust, delete Object.prototype.default, and delete Object.prototype.processor before calling KaTeX
  • Do not allow untrusted input to control the renderer options object or its prototype.
  • Sanitize KaTeX-generated HTML before inserting it into a document.

Details

KaTeX previously used ordinary JavaScript property access in the following contexts:

  • Renderer settings could be inherited from the prototype of the options object.
  • Internal default and processor setting metadata could be inherited from Object.prototype.
  • Namespace lookup could treat inherited properties as built-in definitions.
  • Namespace group restoration could preserve an inherited property as though it had been an explicitly defined value.

The fix adds own-property checks to each of these paths. Inherited properties are no longer accepted as renderer settings, setting metadata, namespace definitions, or values to be restored after a group ends.

For more information

If you have any questions or comments about this advisory:

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm katex >= 0.11.0, < 0.18.2 0.18.2

Odnośniki

Ocena CVSS -
Wektor CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Słabość (CWE)
CWE-807
Platforma
npm
Paczka
katex
Ujawniono
05.10.2026
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-238p-pmpm-9mq7 - CC BY 4.0

Historia podatności: katex

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkich wpisów
6
Pierwsza → ostatnia
03.2024 10.2026
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Średnia 5
  • Niska 1

Ujawnienia w latach

  1. 2024: 4
  2. 2025: 1
  3. 2026: 1
  1. KaTeX: Existing prototype pollution can bypass trust restrictions ten wpis
    Niska CVE-2026-103923 >= 0.11.0, < 0.18.2 0.18.2
  2. Średnia · 6.3 CVE-2025-23207 >= 0.12.0, < 0.16.21 0.16.21
  3. Średnia · 5.5 CVE-2024-28246 >= 0.11.0, < 0.16.10 0.16.10
  4. Średnia · 6.3 CVE-2024-28245 >= 0.11.0, < 0.16.10 0.16.10
  5. Średnia · 6.5 CVE-2024-28244 >= 0.15.4, < 0.16.10 0.16.10
  6. Średnia · 6.5 CVE-2024-28243 >= 0.12.0, < 0.16.10 0.16.10

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.