# SonarQube, SonarCloud, and Spring4Shell

**URL:** <https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926>\
**Category:** Sonar Updates\
**Created:** [April 1, 2022, 8:55am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926 "2022-04-01T08:55:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 1, 2022, 8:55am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/1 "2022-04-01T08:55:40Z")

</div>

Hello SonarSource Community!

This is an announcement to let you know that SonarSource’s products are not susceptible to the Spring4Shell vulnerabilities, i.e. Spring Cloud Function ([CVE-2022-22963](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22963)) or Spring Core ([CVE-2022-22965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22965)).

Thank you.

---

<div class="post-metadata">

**Author:** ![Gabriel\_Contessotto](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gabriel_contessotto/32/32042_2.png) [@Gabriel\_Contessotto](https://community.sonarsource.com/u/Gabriel_Contessotto)\
**Post date:** [April 1, 2022, 4:57pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/2 "2022-04-01T16:57:19Z")

</div>

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![surendrasajwan](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@surendrasajwan](https://community.sonarsource.com/u/surendrasajwan)\
**Post date:** [April 1, 2022, 8:01pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/3 "2022-04-01T20:01:44Z")

</div>

Thanks for confirmation but we require some further confirmation for our security team as we seeing some impacted jars in the Sonarqube work & temp folder.

Appreciate response on the the resolution for those jars ?

---

<div class="post-metadata">

**Author:** ![richard.diederen](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@richard.diederen](https://community.sonarsource.com/u/richard.diederen)\
**Post date:** [April 2, 2022, 7:00pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/4 "2022-04-02T19:00:50Z")

</div>

Hello,

The version of SonarQube we are using (9.3 EE) contains a spring-core library which is suspicious:

sonarqube-9.3.0.51899\lib\extensions\sonar-security-java-frontend-plugin-9.3.0.14923.jar → META-INF\lib\spring-core-5.3.15.jar

Dan you explain in more detail why SQ is not vulnerable?

---

<div class="post-metadata">

**Author:** ![msymons](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/msymons/32/1016_2.png) [@msymons](https://community.sonarsource.com/u/msymons)\
**Post date:** [April 4, 2022, 3:31pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/5 "2022-04-04T15:31:38Z")

</div>

@surendrasajwan, @richard.diederen… have a peek at Spring’s blogpost on the subject: [“Spring Framework RCE, Early Announcement”](https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement). You will see here that `spring-core` is not one of the vulnerable components… even though it is mentioned in the announcement above.

The vulnerability appeared in GitHub Security Advisory Database as [GHSA-36p3-wjmg-h94x](https://github.com/advisories/GHSA-36p3-wjmg-h94x) (note no `spring-core`) on 31st March, and the day before that in Snyk as [SNYK-JAVA-ORGSPRINGFRAMEWORK-2436751](https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2436751) (although it only mentions `spring-beans` as of today, 4th April).

In summary… I think you are both OK 😀

---

<div class="post-metadata">

**Author:** ![rmontag\_ap](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@rmontag\_ap](https://community.sonarsource.com/u/rmontag_ap)\
**Post date:** [April 4, 2022, 4:17pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/6 "2022-04-04T16:17:17Z")

</div>

Hi Mark,  
the [Remote Code Execution in Spring Framework · CVE-2022-22965 · GitHub Advisory Database · GitHub](https://github.com/advisories/GHSA-36p3-wjmg-h94x) is mentioning spring-beans and e.g. SonarQube 8.9.8 is including a vulnerable version (\< 5.2.20) of this lib:

> sonarqube-8.9.8.54436/data/web/deploy/plugins/securityjavafrontend/META-INF/lib/spring-beans-5.2.13.RELEASE.jar

For this reason, I got an alert from our security scanners and was asked to handle this.

---

<div class="post-metadata">

**Author:** ![msymons](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/msymons/32/1016_2.png) [@msymons](https://community.sonarsource.com/u/msymons)\
**Post date:** [April 5, 2022, 4:00pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/7 "2022-04-05T16:00:32Z")

</div>

Yes, the GitHub Advisory does include `spring-beans` (along with other components). I was mostly emphasing that `spring-core` is not impacted. Still, it might help if @Colin gave a bit of clarification. After all, the main reason why Sonarsource products might not be impacted could be down to (say) not using Tomcat.

As an aside, this is where standards such as CycloneDX [Vulnerability Exploitability Exchange](https://cyclonedx.org/capabilities/vex/) (VEX) will become important in the future for allowing automation of announcements.

For what it’s worth, the CVE is still (as of 5th April) not analysed fully and lacks information such as CVSS and CWE. Also, it [appeared in OSS Index](https://ossindex.sonatype.org/vulnerability/6795ec44-f810-47aa-a22e-5d817e52cbdc) just a couple of hours ago… for `spring-beans` only. No mention of `spring-webmvc` or `spring-webflux` as per the original Spring blogpost!

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 6, 2022, 8:15am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/8 "2022-04-06T08:15:58Z")

</div>

Hey all.

While our Java taint analysis engine (in commercial editions) uses a Spring dependency to parse Thymeleaf templates, it is not used to run any kind of web service.

Our security researchers did not find any type of vulnerability in our limited, parsing-only usage of the dependency.

In our latest version of SonarQube (9.4) we have as a matter of course and not due to any specific CVE upgraded to Spring 5.3.15, we are not planning to make an LTS update due to the non-impacting nature of the dependency.

---

<div class="post-metadata">

**Author:** ![pst](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@pst](https://community.sonarsource.com/u/pst)\
**Post date:** [April 7, 2022, 12:58pm UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/9 "2022-04-07T12:58:28Z")

</div>

Hi,  
we are using the LTS version and like Rainer Montag, I’m also asked to fix it by our security team. So it is not quite “non-impacting” for us…

---

<div class="post-metadata">

**Author:** ![SebastianM](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@SebastianM](https://community.sonarsource.com/u/SebastianM)\
**Post date:** [June 23, 2022, 6:24am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/10 "2022-06-23T06:24:57Z")

</div>

At Colin: Can you please confirm, that you are also not vulnerable to [CVE-2022-22950](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22950)?

Because if I understand the vulnerability correctly it lies within SPEL which is indeed used when parsing Thymeleaf templates according to the official documentation. See section 2 in this link [Tutorial: Thymeleaf + Spring](https://www.thymeleaf.org/doc/tutorials/3.0/thymeleafspring.html).

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [June 23, 2022, 7:40am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/11 "2022-06-23T07:40:49Z")

</div>

None of our products are vulnerable to CVE-2022-22950.

---

<div class="post-metadata">

**Author:** ![SebastianM](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@SebastianM](https://community.sonarsource.com/u/SebastianM)\
**Post date:** [June 23, 2022, 8:38am UTC](https://community.sonarsource.com/t/sonarqube-sonarcloud-and-spring4shell/60926/12 "2022-06-23T08:38:49Z")

</div>

Thank you for the fast and precise response!
