逛 iThome 的時候看到的新聞:Apache基金會修補Tomcat高風險資安漏洞
其中 CVE-2025-31651 的 CVSS 風險居然高達 9.8 分(滿分 10 分),這應該是繼 2021 年 Log4Shell(CVE-2021-44228,拿到滿分 10 分)之後分數最高的一個漏洞。
正所謂「免費的最貴」正是這個意思。
當然,也有可能正是因為免費、再加上 Spring Boot 的推波助瀾,所以用的人最多,造成更多駭客對 Apache Tomcat 更有興趣。
我查了一下 Apache Tomcat 的 CVE 清單:https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=apache+tomcat 有 255 個。
JBoss 的 CVE 清單:https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=jboss 有 248 個。
創業那幾年用的 Eclipse Jetty CVE 清單:https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=jetty 有 91 個。
現在最愛用的 Open Liberty/WebSphere Liberty CVE 清單:https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=open+liberty/https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=websphere+liberty 加起來有 64 個,會把這兩者加起來的原因是:Open Liberty 與 WebSphere Liberty 的釋出版本是一致的,Open Liberty 有的 feature,WebSphere Liberty 也會有;當然 WebSphere Liberty 有的 feature,Open Liberty 就沒有了(給付費版一點飯吃嘛)。
另外,Open Liberty 自己統計的 CVE 有 71 個:https://openliberty.io/docs/latest/security-vulnerabilities.html,其中分數超過 8 的有 3 個,而兩個其實是 Apache 的 library 造成的。WebSphere Liberty 自己統計的 CVE 則是有 85 個:https://www.ibm.com/support/pages/bulletin/search?q=WebSphere%20Application%20Server%20Liberty。
從 CVE 多寡的角度看,Open Liberty/WebSphere Liberty 應該是略勝一籌。
效能的部分,可以參考 IBM developer 網站的資訊:https://developer.ibm.com/articles/6-reasons-why-open-liberty-is-an-ideal-choice-for-developing-and-deploying-microservices/ 不管在 throughput 或是 memory footprint 的部分,Open Liberty/WebSphere Liberty 都比 Wildfly 以及 Tomee(Tomcat 的 JavaEE/JakartaEE 認證版本)要好。
而在這個 IBM developer 網址裡面,還有提到一個 Open Liberty/WebSphere Liberty 我個人覺得很有優勢的部分:「完整的 Maven/Gradle 支援」。
- Apache Tomcat 很早就放棄了 Maven Plugin 支援:https://tomcat.apache.org/maven-plugin.html。
- JBoss 的 Maven Plugin 也是古董了(看起來是 JBoss v7):https://github.com/jbossas/jboss-as-maven-plugin,JBoss v8 的 Maven Plugin 在這:https://github.com/jbossas/eap-maven-plugin;而 JBoss v7 與 v8 在整個 migration path 上面挑戰很多,有機會再來詳述。
- Eclipse Jetty 的 Maven Plugin 有持續在更新,這也是我那幾年很愛用 Jetty 的緣故:https://jetty.org/docs/jetty/12/programming-guide/maven-jetty/jetty-maven-plugin.html,而愛用 Jetty 也讓我閃過了 Log4Shell 那場災難。
- Liberty 的 Maven Plugin 有持續在更新:https://github.com/OpenLiberty/ci.maven。
而中介軟體能提供 Maven/Gradle 支援,對於當前的開發組織來說有多方便,就不用多說了;詳細的 Liberty Maven/Gradle 使用方式,也是之後再來詳述。
簡單綜合以下三點:
- 安全性(更少的 CVE)
- 效能
- 開發者支援
既然你都要用 Open Source 了,怎麼不一開始就用 Open Liberty 呢?
Add comment