Katalog CVE

CVE-2026-10618

ŚrednieCVSS 5.4
Opublikowano: Zaktualizowano: Przetłumaczono: NVD NIST

Prawdopodobieństwo exploitacji (EPSS)

Niskie ryzyko
0.22%

Percentyl 12 - wyżej niż 12% wszystkich znanych CVE

Streszczenie

Domyślny renderer bloków kodu w Hugo zapisuje wartości atrybutów pochodzące z ciągu informacyjnego bloku kodu do wygenerowanego HTML bez ich escapowania. Nowy kod w markup/internal/attributes/attributes.go konwertuje każdą wartość atrybutu z bajtów na string, pomijając escapowanie, a funkcja RenderAttributes escapuje tylko wartości, które nadal są bajtami, więc jej gałąź escapowania nigdy nie jest osiągana. Cudzysłów w wartości atrybutu może zakończyć atrybut i umożliwić dodanie kolejnego atrybutu, w tym obsługi zdarzeń, co prowadzi do wykonania skryptu dla każdego odwiedzającego stronę.

Ocena ryzyka

Wykonanie skryptu w przeglądarce odwiedzającego może prowadzić do kradzieży danych, przejęcia sesji lub rozprzestrzeniania złośliwego oprogramowania.

Rekomendacja

Zaktualizuj Hugo do wersji, która zawiera poprawkę. Tymczasowo wyłącz domyślne renderowanie bloków kodu lub użyj niestandardowego hooka renderującego z odpowiednim escapowaniem.

Inne podatności w Hugo

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS