Żądny wiedzy? Wbijaj na Mega Sekurak Hacking Party w maju! -30% z kodem: majearly

Krytyczna podatność (RCE) w Struts. Wydawało się wszystkim, że została załatana w 2020 roku. Ale jednak nie…

15 kwietnia 2022, 11:35 | W biegu | 0 komentarzy
Tagi: , ,

Chodzi o CVE-2021-31805 (niech Was nie zmyli rok w nazwie, podatność załatano co dopiero).

Niby wcześniej załatano już CVE-2020-17530, no właśnie – „niby” bo udało się znaleźć obejście:

Late last year, 2020, a fix for a remote code execution (RCE) vulnerability discovered by Alvaro Munoz and Masato Anzai, was published by Apache Struts that goes by S2-061 or CVE-2020-17530 a „Forced OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution – similar to S2-059  or CVE-2019-0230. While fixes to both have helped in limiting the vulnerable scenarios while using the Struts2 library and strengthening its sandbox, remote code execution is still possible in the latest versions of Struts 2.5.26.

Proof of Concept exploitu możecie zobaczyć tutaj:

 

Podatne są wszystkie wersje Strutsa od 2.0.0 do Struts 2.5.29 (włącznie). Przy czym uwaga – też nie każda aplikacja zbudowana w oparciu o Struts musi być automatycznie podatna (chociaż jak widać powyżej – demo dostarczane ze Strutsem jest podatne).

Sprawdźcie czy Wasz projekt gdzieś tego nie używa i łatajcie się (ew. poproście dostawcę o łatkę…).

PS
Nieco zaskakujący (?) jest też dość długi czas reakcji ekipy Struts – na zgłoszenie buga:

Jan 4th 2021 – Submitted issue to security@struts.apache.org.

April 12th 2021 – Struts after talking with Apache said „its a dilemma to consider these issues vulnerability or not” [:-D przyp. sekurak] But said they were working on a fix that looks promising. 



April 4th 2022 – Fixes went out for multiple issues CVE-2021-31805 – https://github.com/apache/struts/pull/496 

~Michał Sajdak

Spodobał Ci się wpis? Podziel się nim ze znajomymi:



Komentarze

Odpowiedz