Kritična ranjivost u dekoderu Brotli koja utječe na Node.JS, Bun, preglednike, HTTP klijente i druge projekte

U biblioteci s referentnom implementacijom dekodera formata kompresije podataka Brotli otkrivena je ranjivost (CVE-2026-111497, kodna imena Broccoli2Shell i HTTP2Shell) koja dovodi do preljevanja bafera prilikom obrade posebno oblikovanih komprimiranih podataka. Prema podacima Googlea, ranjivost se može iskoristiti za daljinsko izvršavanje koda prilikom napada na projekte koji koriste službenu implementaciju dekodera Brotli. Među pogođenim projektima su: Node.js, Bun, Envoy, Istio, web preglednici, proxy serveri, HTTP klijenti, HTTP serveri, arhivatori, UEFI firmware, preglednici JPEG XL, knjižnice za dekodiranje sadržaja za Python, Ruby, Java, PHP i .NET te povezane ovisnosti.

Problem je otkriven od strane kompanije OpenAI u veljači ove godine i blokiran u kodnoj bazi Brotli odbacivanjem nepravilnih streamova prilikom dekodiranja. 22. listopada objavljene su ispravne verzije Brotli 1.0.10, 1.1.1 i 1.2.1 u kojima je jasno navedeno da je ranjivost ispravljena i suština problema riješena. Iste je dane stvoren prototip eksploita, koji je omogućio daljinsko izvršavanje koda u laboratorijskim uvjetima, koristeći nestandardne gradnje (u standardnim gradnjama došlo je do rušenja). Kasnije je kompanija Imperva zabilježila napad na standardne gradnje Node.js 24.22.0 u Linux okruženju na ARM64 sustavu.

Ranjivost dovodi do pisanja izvan bafera zbog nepravilnog rukovanja pogreškama tijekom analize blokova u komprimiranom streamu. Funkcija DecodeBlockTypeAndLength() umjesto koda pogreške vraćala je samo vrijednosti true i false, što nije omogućilo pozivnom kodu da razlikuje oštećenje streama od stanja koje zahtijeva prijenos dodatnih podataka u funkciju. U slučaju da je u streamu naveden neispravan tip bloka komprimiranih podataka, dekoder ga je doživljavao ne kao grešku, već kao stanje nedostatka podataka, koje je zahtijevalo dodatno čitanje iz streama. Međutim, s obzirom na to da je dodijeljeni bafer bio proračunat bez dodatno pročitanih podataka, oni su se pisali u područje izvan njegovih granica, gdje se čuvalo interno stanje dekodera.

Projekti pogođeni ranjivosti:

  • Referentna biblioteka brotli, problem se pojavljuje od izdanja 1.0.3 i ispravljen je u nadogradnjama 1.0.10, 1.1.1 i 1.2.1. Ranjivost utječe na aplikacije i biblioteke koje koriste biblioteku libbrotlidec.
  • JavaScript platform Node.js, problem resolved in updates 26.12.1, 24.22.1, and 22.23.4. Applications that use the fetch() method for requesting third-party content, which automatically decodes HTTP responses with the header 'Content-Encoding: br', may be exploited. The vulnerability also manifests when directly calling methods zlib.brotliDecompress*(), createBrotliDecompress(), and brotli.decompress() for unpacking third-party content or when processing HTTP requests parsed through the Express 5 and body-parser 2.x libraries.
  • Python packages brotli and brotlicffi (fix proposed in version 1.2.1) and the projects that use them, including popular libraries such as urllib3, aiohttp, httpx, and Scrapy, which decode responses with the header 'Content-Encoding: br' when accessing external web resources.
  • HTTP servers, HTTP proxies, HTTP clients, and web browsers that support Brotli compression ('Accept-Encoding: br'). Apache httpd comes with mod_brotli (disabled by default). For nginx, there is a third-party module ngx_brotli (with the brotli version in dependencies updated to the latest). In Chrome/Chromium and Firefox, the issue has already been resolved in one of the previous updates.serveru Envoy vulnerability fixed in releases 1.40.0, 1.39.3, 1.38.6, 1.37.8, 1.36.12.
  • .NET runtime when using BrotliDecoder, BrotliStream, and HttpClient methods in the application. The vulnerability is not yet fixed.
  • PHP extension brotli when using the function brotli_uncompress(). The fix is in progress.
  • Ruby package brotli when using the method Brotli.inflate. The vulnerability is not yet fixed.
  • DuckDB database when importing compressed Parquet files. The fix is in progress.
  • ClickHouse database. The fix is in progress.
  • YDB database. The vulnerability is not yet fixed.
  • Apache Arrow when importing compressed Parquet files. The fix is in progress.
  • libjxl (when compressing metadata in JPEG XL, Brotli is used).
    The fix is in progress.
  • Archivers NanaZip, 7-Zip-zstd, and p7zip when unpacking br files. The vulnerability is not fixed.
  • MuPDF. The vulnerability is not fixed.
  • UEFI firmware based on EDK II and UEFITool, compressed using Brotli. The fix is in progress — EDK II and UEFITool.
  • JavaScript platform Bun. The vulnerability was fixed in version 1.4.4.
  • Platform for managing microservices Istio. The vulnerability was fixed in versions 1.29.9, 1.30.6, and 1.31.2.
  • curl and libcurl, the vulnerability manifests when a vulnerable version of libbrotlidec is included in dependencies.
  • Parsers of the Web Open Font (WOFF) font format, in which
    Brotli is used.
  • Brotli4j, SumatraPDF, Ghostscript, CatBoost i YTsaurus. Ranljivost je ispravljena u jednoj od ažuriranja.

Izvor: opennet.ru

Kupite pouzdan hosting za web stranice s DDoS zaštitom, VPS VDS servere 🔥 Kupite pouzdan hosting za web stranice s DDoS zaštitom, VPS VDS servere | ProHoster