CVE-2025-41249
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe Spring Framework annotation detection mechanism may not correctly resolve annotations on methods within type hierarchies with a parameterized super type with unbounded generics. This can be an issue if such annotations are used for authorization decisions. Your application may be affected by this if you are using Spring Security's @EnableMethodSecurity feature. You are not affected by this if you are not using @EnableMethodSecurity or if you do not use security annotations on methods in generic superclasses or generic interfaces. This CVE is published in conjunction with CVE-2025-41248 https://spring.io/security/cve-2025-41248 .
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceSpring Framework's annotation detection fails to correctly resolve security annotations (like @PreAuthorize) on methods within type hierarchies that extend parameterized super types with unbounded generics. When using @EnableMethodSecurity, this can cause authorization checks to be bypassed for affected methods because the annotation detection mechanism does not properly traverse these generic type hierarchies.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify the Spring Framework version in useInspect your project's dependency manifest: for Maven, check pom.xml for the spring-framework-version or spring-security-version; for Gradle, check build.gradle. Also examine the JAR files in your deployment for spring-core or spring-security-core and note the exact version from the filename.Affected if The installed Spring Framework version falls within the vulnerable range (prior to the patched release).
-
Confirm @EnableMethodSecurity is enabledSearch your codebase for the @EnableMethodSecurity annotation. This may appear on any @Configuration class, typically in a security configuration file. Use grep or your IDE to search for 'EnableMethodSecurity'.Affected if @EnableMethodSecurity is present and active in your application configuration.
-
Locate classes extending unbounded generic supertypesSearch for Java classes that declare inheritance from generic supertypes using unbounded type parameters, such as 'extends BaseClass<T>' or 'extends AbstractDao<T>' where <T> has no bounds (no 'extends SomeType' or '? extends Something'). Use grep to find patterns like 'extends.*<[A-Z]>' in your .java source files.Affected if Your codebase contains classes that extend parameterized super types with unbounded generic type parameters.
-
Identify @PreAuthorize or @Secured annotations on methods in affected classesFor each class identified in step 3, examine whether methods within those classes (or their parent hierarchies) carry @PreAuthorize, @Secured, or other method-level security annotations. Search for these annotations in the same class hierarchy.Affected if Security annotations like @PreAuthorize exist on methods within classes that extend unbounded generic supertypes, and these annotations may not be correctly detected by the framework.
Your environment is affected if you use a vulnerable Spring Framework version with @EnableMethodSecurity enabled and have classes extending unbounded generic supertypes that contain security-annotated methods, as the framework may fail to enforce authorization on those methods.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataReview all methods in classes that extend generic superclasses or implement generic interfaces for proper authorization enforcement; consider applying security annotations directly on interface methods or upgrading to the patched Spring version when available.
- Consultation4.0 h
- Implementation6.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,544.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-41249 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-41249 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data