Spring Framework Annotation Detection Vulnerability in libspring-java

libspring-java Updated 02 Oct 2025

Summary

16/09/2025
N/A
No i
Unrated
Not published

CVE-2025-41249: The Spring Framework annotation detection mechanism may not correctly resolve annotations on methods within type hierarchies with a parameterized super type with unbounded generics. Affects libspring-java versions 4.3.30-1 – 4.3.30-3. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libspring-java is a core component of the Spring Framework, which is widely used for building Java applications. It provides essential features such as dependency injection, aspect-oriented programming, and transaction management. This package is crucial for developers utilizing Spring Security, particularly when implementing method-level security annotations. However, it is susceptible to a vulnerability that affects the annotation detection mechanism, especially in complex type hierarchies.

Vulnerability Detail

The vulnerability arises from the Spring Framework's annotation detection mechanism, which may fail to correctly resolve annotations on methods within type hierarchies that involve parameterized super types with unbounded generics. This flaw can lead to improper authorization decisions if security annotations are applied to methods in generic superclasses or interfaces. Applications using Spring Security's @EnableMethodSecurity feature are particularly at risk, while those not utilizing this feature or security annotations in generic contexts remain unaffected.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using security annotations on methods that are part of generic superclasses or interfaces. This will help mitigate the risk until a patch is applied.

Conclusion

The CVE-2025-41249 vulnerability in the libspring-java package poses a significant risk to applications utilizing Spring Security's method-level security features. It is crucial for developers to update their packages to the latest versions and consider workarounds to mitigate potential security issues until a patch is applied.

See every vulnerability recorded for libspring-java →

Share this vulnerability

FAQ

CVE-2025-41249 is a vulnerability in the Spring Framework that affects the annotation detection mechanism, potentially leading to improper authorization decisions.

Applications using Spring Security's @EnableMethodSecurity feature and employing security annotations on methods in generic superclasses or interfaces are at risk.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If immediate updates are not possible, refrain from using security annotations on methods in generic superclasses or interfaces as a temporary workaround.

More details can be found in the official Spring Security announcement at https://spring.io/security/cve-2025-41248.

Related vulnerabilities

Recent vulnerabilities recorded for libspring-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback