Updating to latest stable version (in this case 3.0) is probably the best idea in the long run.

However, updating the major version (2.3.x -> 3.0) might be more complicated and require more work than updating to latest minor version (2.3.x -> 2.7.x). If you don't have a lot of time for this and some older version already have fixes included for those vulnerabilities it might be a viable option too. It's also possible that you have some dependencies that are not compatible with newest Spring Boot yet. But again, I believe that going for latest version is best if possible.

Spring boot parent should already contain all needed spring components versions. For example Spring Boot 2.7.3 uses spring-core:5.3.22 and you don't need to define it explicitly yourself.

Answer from Pekinek on Stack Overflow
🌐
DZone
dzone.com › refcards › java application vulnerabilities
Java Application Vulnerabilities - DZone Refcards
This list is compiled from the vulnerabilities found in Java applications as reported in the WhiteHat Security Application Security Statistics Report for 2017. For each vulnerability type, you will find a description of how and where it occurs, examples on how to fix it, and other general ...
🌐
UpGuard
upguard.com › blog › top-10-java-vulnerabilities-and-how-to-fix-them
Top 10 Java Vulnerabilities And How To Fix Them | UpGuard
January 9, 2025 - To fix the above vulnerabilities, you will need to identify which of these technologies are being used in your environment, and visit the respective vendor/project's website for update/patch information.
Discussions

spring - Fixing Open source Vulnerabilities in Java - Stack Overflow
For example for JavaScript modules if used in mostly Java project. ... Updating to latest stable version (in this case 3.0) is probably the best idea in the long run. However, updating the major version (2.3.x -> 3.0) might be more complicated and require more work than updating to latest minor version (2.3.x -> 2.7.x). If you don't have a lot of time for this and some older version already have fixes included for those vulnerabilities ... More on stackoverflow.com
🌐 stackoverflow.com
How do you fix OS, Java vulnerabilities continuously when shipping Dockerized applications?

If you constantly have CVE to fix you can consider different options :

  • mitigate the CVE, not every CVE need to be fixed if countermeasures exists.

  • reduce your surface attack, maybe your dev are too permissive with services that's are not needed

  • be more proactive, it ask less efforts by testing everything yourself before shipping. I understand you already do that but if the language/library you use are constantly source of exploit and if security is business critical then switching to another language might be the most viable solution

  • Split your development in modules so you can reduce the blast radius of a CVE on a module to an another one.

Good luck

Edit : not sure if I made myself understood English is not my everyday language

More on reddit.com
🌐 r/cissp
7
3
October 10, 2022
Spring4Shell Detection: New Java Vulnerability Follows in the Footsteps of Notorious Log4j

This is a much smaller footprint then log4j... Well so far. You have to have the request posted converted into a bean, with the webapplicationclass loader.

Take it any of those Tomcat with web app cl Bean conversion of requests Java 9+ And it no longer occurs.

Even better per my testing spring security prevents this too well without authentication or custom auth beans.

Don't get me wrong this is a hell of a nice find, and will cause some headaches, but not quite the scale of log4j. Well so far.

More on reddit.com
🌐 r/programming
2
13
April 2, 2022
Spring4Shell: Security Analysis of the latest Java RCE '0-day' vulnerabilities

We've been able to reproduce this but the conditions required are very specific and unusual so we had to really misconfigure the product to reproduce the exploit. So far, it doesn't seem to work at all with JDK 8 which is all we use. I feel like some of these research bloggers are trying to blow this up because they want to break the next log4j disaster but... this isn't even close. The RCE itself could be bad but the possibility of exploiting this in the wild with all of the stars aligning just right... very slim. Big reason why we still haven't seen anyone do it yet.

More on reddit.com
🌐 r/netsec
28
151
March 30, 2022
🌐
Qwiet AI
qwiet.ai › common-vulnerabilities-in-java-and-how-to-fix-them
Common Vulnerabilities in Java and How to Fix Them - Preventing the Unpreventable | Qwietᴬᴵ
July 31, 2023 - The use of every language, framework, or environment exposes the application to a unique set of vulnerabilities. The first step to fixing vulnerabilities in your application is to know what to look for. Today, let’s take a look at 30 of the most common vulnerabilities that affect Java applications, and how you can find and prevent them.
🌐
MergeBase
mergebase.com › blog › java-vulnerabilities
The Top 10 High-Risk Java Vulnerabilities, & How to Fix Them
July 7, 2023 - This could allow attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in an information leak and remote code execution in some environments and local code execution in all environments. Log4j 2.16.0 (Java 8) and 2.12.2 (Java 7) fix this issue by removing support for message lookup patterns and disabling JNDI functionality by default. MergeBase released a public free tool for detecting vulnerable Log4J versions within any applications that are vulnerable.
Top answer
1 of 2
4

Updating to latest stable version (in this case 3.0) is probably the best idea in the long run.

However, updating the major version (2.3.x -> 3.0) might be more complicated and require more work than updating to latest minor version (2.3.x -> 2.7.x). If you don't have a lot of time for this and some older version already have fixes included for those vulnerabilities it might be a viable option too. It's also possible that you have some dependencies that are not compatible with newest Spring Boot yet. But again, I believe that going for latest version is best if possible.

Spring boot parent should already contain all needed spring components versions. For example Spring Boot 2.7.3 uses spring-core:5.3.22 and you don't need to define it explicitly yourself.

2 of 2
0

Is there any guiding principle based on which we need to select the version of spring boot.

Generally you would select the Spring Boot version which has got the vulnerability fixed as your objective is related to security. Many times you are so behind that Spring may not provide security patches release for that minor version line that you will need to upgrade to major version but this requires lots of testing as there may be breaking changes as far as functionality is concerned. Also worth referring is CVE vulnerability database for any specific vulnerability coming from transitive dependencies. You can search for a library name ( for e.g., log4j or jackson ) to check what vulnerability is there and if it has been patched in any version.

🌐
O360
offensive360.com › most-common-vulnerabilities-in-java-how-to-fix
Most Common Vulnerabilities in Java and How to Fix
December 21, 2023 - One of the easiest ways to prevent command injection is to implement robust input validation in the form of an allowlist. Read about how to implement allowlists to prevent RCE here. Command injection is also a type of Common Vulnerabilities in Java. Injection happens when an application cannot properly distinguish between untrusted user data and code.
🌐
MergeBase
mergebase.com › blog › find-security-vulnerabilities-java
How to Find & Fix Known Vulnerabilities in Your Java Apps w/MergeBase
October 10, 2023 - Fortunately, our software composition analysis tool lets you quickly find and prioritize vulnerabilities in your Java projects. Our developer guidance makes it far easier to patch vulnerabilities once they’re detected. ... 1. How to find security vulnerabilities 2. How to prioritize fixes with MergeBase 3.
Find elsewhere
🌐
Medium
medium.com › javarevisited › security-vulnerabilities-in-java-application-e844bd281ff2
Security Vulnerabilities in Java application | by Srikanth Dannarapu | Javarevisited | Medium
April 9, 2023 - Running this program may produce ... were "password1". To fix this vulnerability, we can switch to using a stronger hash function, such as SHA-256 or SHA-512, instead of MD5....
🌐
SonarSource
rules.sonarsource.com › java › type › vulnerability
Java static code analysis | Vulnerability
Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your JAVA code
🌐
Codacy
blog.codacy.com › java-vulnerabilities
11 Common Java Vulnerabilities and How to Avoid Them
2 weeks ago - We explore 11 common Java security vulnerabilities, highlighting how they arise, how to spot them and how they can be mitigated.
🌐
Offensive360
offensive360.com › blog › most-common-vulnerabilities-in-java-how-to-fix
13 Common Java Security Vulnerabilities & How to Fix Them | Offensive360
January 15, 2022 - Never use string concatenation to build SQL queries. Use PreparedStatement for JDBC, or the ORM’s built-in parameterization for Hibernate/JPA. Java’s XML parsers enable XXE by default. An attacker supplying crafted XML can read arbitrary files from the server. // VULNERABLE: Default DocumentBuilderFactory DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(inputStream); // SECURE: Disable external entities DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); factory.setFeature("http://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); DocumentBuilder builder = factory.newDocumentBuilder();
🌐
Security Boulevard
securityboulevard.com › home › cybersecurity › devops › common vulnerabilities in java and how to fix them
Common vulnerabilities in Java and how to fix them - Security Boulevard
November 30, 2021 - The use of every language, framework, or environment exposes the application to a unique set of vulnerabilities. The first step to fixing vulnerabilities in your application is to know what to look for. Today, let’s take a look at 30 of the most common vulnerabilities that affect Java applications, and how you can find and prevent them.
🌐
Quora
quora.com › How-do-I-efficiently-handle-Java-application-vulnerabilities-without-hassle
How to efficiently handle Java application vulnerabilities without hassle - Quora
Answer: In today’s digital landscape, securing Java applications is paramount. Ensuring that your applications are free from vulnerabilities can be a daunting task, but with the right approach, it can be hassle-free. Here are some techniques to efficiently handle Java application vulnerabilities....
🌐
OpenRewrite
docs.openrewrite.org › recipes › java › dependencies › dependencyvulnerabilitycheck
Redirecting to Find and fix vulnerable dependencies
February 5, 2026 - This recipe has moved to Moderne docs · If you are not redirected automatically, click here
🌐
Oracle
oracle.com › java › technologies › java se
Java Security Resource Center
Critical Patch Updates, Security Alerts and Bulletins: Lists announcements of security fixes. Java Cryptographic Roadmap: Represents Oracle's plans for changes to the security algorithms and associated policies and settings in the JRE and JDK. Security Developer's Guide (latest JDK release). The following are links to the Security Developer's Guide for earlier LTS releases: ... Secure Coding Guidelines for Java SE: Learn defensive coding strategies to properly mitigate weaknesses in software and prevent vulnerabilities.
🌐
Reddit
reddit.com › r/cissp › how do you fix os, java vulnerabilities continuously when shipping dockerized applications?
r/cissp on Reddit: How do you fix OS, Java vulnerabilities continuously when shipping Dockerized applications?
October 10, 2022 -

I need to be studying for my CISSP but all my time is being consumed by this. Please let me know if there are any other subreddits I should be asking this question on. Here is the explanation, any help would be great.

My company (10 workers) ships our Java based web service product packaged as docker containers. We try our best to fix vulnerabilities in base OS image, then our JDK jars etc. However since new vulnerabilities are constantly discovered, our customers keep scanning the container images we provide and ask us to fix a large list of CVEs.

A Java library related CVE that may not have been there three months ago when we shipped, can now be used as an excuse by the client to force to us to invest significant amount of time in redevelopment, regression testing and shipping a new version, which again will have vulnerabilities with a week of us releasing it.

How do people usually deal with this? The volume of vulnerabilities is insane and there is no possible way we can fix it all. We fear we will go out of business. How do we approach this?

🌐
Medium
medium.com › @gavinklfong › how-to-efficiently-handle-java-application-vulnerabilities-without-hassle-7c85c5acb938
How to efficiently handle Java application vulnerabilities without hassle | by Gavin F. | Medium
March 8, 2023 - How to efficiently handle Java application vulnerabilities without hassle How to keep track of known vulnerabilities and quick tips on how to resolve them using automation Unless a primitive feature …
🌐
Spectral
spectralops.io › home › top 10 most common java vulnerabilities you need to prevent
Top 10 Most Common Java Vulnerabilities You Need to Prevent - Spectral
January 24, 2021 - The easiest method is to apply input validation with output sanitizing and escaping. This means that any attempts at sending HTML code will be parsed or rejected, depending on what your application is doing.
🌐
HBS -
hbs.net › how to fix the java log4j vulnerability
How to Fix the Java Log4j Vulnerability - HBS
May 29, 2025 - Use Security Scanners Several security tools can scan for Log4j vulnerabilities: - Log4j Detect (by CISA) - Qualys Log4j Scanner - Nessus and Rapid7 Scanners · Review Application Dependencies Many applications use Log4j indirectly via dependencies. Use tools like: - Dependency-Check - Syft (for containerized environments) - Maven or Gradle Dependency Tree ... Or manually replace Log4j JAR files in your application. If updating is not feasible right away, apply these temporary fixes:
Address   1700 Stephen St, 54140, Little Chute