CVE-2026-59273: Spring Security, the matcher that runs your string
Spring Security's ELRequestMatcher evaluates SpEL in an unrestricted context, and Spring data binding will turn a supplied string into one. A differential harness shows the bound string reaching type references on 7.1.2 and being refused on 7.1.3. Inert payloads, no execution chain.
- Name
- CVE-2026-59273: Spring Security, the matcher that runs your string
- Type
- N-day analysis
- CVE
- CVE-2026-59273
- CVE Risk
- critical
- Disclosure Status
- public
- Vendor
- Spring Security
- Affected
- Spring Security 7.1.0 through 7.1.2 and 7.0.0 through 7.0.8, plus the 6.5, 6.4, 5.8 and 5.7 lines. Fixed in 7.1.3 and 7.0.9 open source; 6.x and 5.x need a commercial patch. Reachable when an application binds outside input to a RequestMatcher-typed property.
- Published
- 21 Nov 2026
- Updated
- 21 Nov 2026
- Tags
- n-day, spring-security, spel, cwe-94, cwe-95, cwe-470, java
A string that the framework agrees to run
Spring Security 7.1.2 ships a request matcher that takes a SpEL expression and evaluates it in a context with no restrictions. Type references resolve. Static methods run. Spring's own data binding will happily construct one of these matchers from a string an application accepted from outside, which means the expression does not have to come from the developer.
The catch is that the application has to bind outside input onto a property of that type. Most applications never do. The ones that do, on an unpatched jar, are handing an expression evaluator a string they did not write. The vendor scored this 9.8 and published it on 19 November.
I spent the next two days on one question: is that binding path real, or does the framework refuse the conversion somewhere before the expression ever runs.
I am @abraxas_null. The harness is abraxas/cve-2026-59273-spring-security-elmatcher, and the client is cve-2026-59273-spring-security-elmatcher-Abraxas-Labs.py.
The class, the reach, and what this artifact is
Class: expression injection reachable through data binding. Reach: remote, conditional on a binding site.
CVE-2026-59273 (vendor advisory). CWE-94, CWE-95, CWE-470. Critical 9.8, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, which is the vendor's vector.
I want to be plain about what I published, because the word proof gets used loosely around a bug like this. The repository contains a differential harness. It binds a string onto a RequestMatcher property through Spring's data binding, then asks the resulting matcher to evaluate it, once on the vulnerable line and once on the patched line. Every payload in it is inert. There is no process class, no Runtime, no ProcessBuilder, no class loader work. Math.abs is the deepest call in the tree.
What it demonstrates is reachability: on 7.1.2 a bound string becomes an ELRequestMatcher, and that matcher evaluates the expression with type access. On 7.1.3 the same expression is refused. That is the claim a fix is judged against, and it is the regression test the fix should ship with. It is not a weaponised chain, and I did not build one.
Why the binding path was the open question
The advisory names two halves. The matcher evaluates in an unrestricted StandardEvaluationContext, which is the bug. Spring's data binding discovers a converter for the type by naming convention, which is the delivery. The first half is visible in the class. The second half depends on what Spring actually does at runtime, and that is where I expected the whole thing to fall apart.
It did not fall apart, but it also did not work the way the advisory describes. The advisory points at a property editor. On both releases the JDK naming-convention lookup comes back empty:
editor=noneThe bind still succeeds, through the ELRequestMatcher(String) constructor that Spring's type conversion finds. That distinction matters for anyone auditing an application, because it moves the question. You are not looking for a registered PropertyEditor. You are looking for a RequestMatcher-typed property that outside input can reach, and Spring will find the constructor on its own.
That is the narrower question, and it is the one worth asking of a real application.
Two contexts, one constructor
The patch is a three-line change in the evaluation context, and it is easier to see in bytecode than in prose:
$ javap -p -c -classpath spring-security-web-7.1.2.jar ...ELRequestMatcher
public EvaluationContext createELContext(HttpServletRequest);
0: new #50 // class org/springframework/expression/spel/support/StandardEvaluationContext
9: invokespecial #54 // ELRequestMatcherContext."<init>"
12: invokespecial #57 // StandardEvaluationContext."<init>"
$ javap -p -c -classpath spring-security-web-7.1.3.jar ...ELRequestMatcher
public EvaluationContext createELContext(HttpServletRequest);
0: invokestatic #50 // SimpleEvaluationContext.forReadOnlyDataBinding
3: invokevirtual #56 // SimpleEvaluationContext$Builder.withInstanceMethods
14: invokevirtual #66 // SimpleEvaluationContext$Builder.withRootObject
17: invokevirtual #70 // SimpleEvaluationContext$Builder.buildStandardEvaluationContext is the permissive one. It allows type references, so T(...) resolves and static methods run. SimpleEvaluationContext is the restricted one, and the builder is configured read-only with instance methods.
That withInstanceMethods() is the detail I nearly missed, and it cost me a false negative. My first discriminator was 'witness'.toUpperCase() == 'WITNESS', which is an instance method call. It matched on 7.1.3 as well, because the patch keeps instance methods deliberately. A regression test written that way would pass on both versions and prove nothing. The probe has to be a type reference.
Three probes, and only one of them moves
The harness runs the same three expressions against both pins:
| Probe | 7.1.2 | 7.1.3 | Why it behaves that way |
|---|---|---|---|
1 + 1 == 2 |
matches | matches | Arithmetic is allowed in both contexts |
'witness'.toUpperCase() == 'WITNESS' |
matches | matches | withInstanceMethods() survives the patch |
T(java.lang.Math).abs(-1) == 1 |
matches | SpelEvaluationException |
Type references are refused by SimpleEvaluationContext |
The third row is the finding. The first two rows are the control, and the second row is the trap.
# vulnerable 7.1.2
RESULT label=7.1.2 elMatcher=yes editor=none arith.matched=true instance.matched=true typeref.matched=true
# patched 7.1.3
RESULT label=7.1.3 elMatcher=yes editor=none arith.matched=true instance.matched=true typeref.matched=false typeref.error=SpelEvaluationExceptionRecorded on JDK 27.0.1 with Maven 3.10.0, macOS arm64.
What an attacker can do
The precondition is an application that binds outside input onto a RequestMatcher-typed property. Where that exists, on an unpatched jar:
| Position | Method or sink | Recon, integrity, availability, confidentiality | Proven or inferred |
|---|---|---|---|
| Application binds outside input to a matcher property | BeanWrapperImpl#setPropertyValue resolves ELRequestMatcher(String) |
Integrity, control flow | Lab-proven. The bound value becomes ELRequestMatcher |
| The bound expression runs when a request is matched | ELRequestMatcher#matches calls Expression#getValue |
Integrity | Lab-proven. typeref.matched=true on 7.1.2 |
| The expression reaches types and static methods | StandardEvaluationContext |
Integrity | Lab-proven. T(java.lang.Math) resolves and runs |
| The same expression on the patched line | SimpleEvaluationContext |
n/a | Lab-proven. SpelEvaluationException |
| Read application data through reflection | type access | Confidentiality | Inferred from type access. Not exercised in this repository |
| Invoke a process in the application | type access | Availability | Inferred from the advisory's classification. Not exercised in this repository |
Stays closed
| Axis | Why |
|---|---|
| An application that never binds input to a matcher | The vulnerable jar alone is not reachable. The precondition is application shape |
| Command execution in this repository | No process payload exists here, by design |
| A regression test using only an instance method | 7.1.3 keeps instance methods, so that test passes on both versions |
| Using this artifact as proof of code execution | It demonstrates evaluation with type access, not a completed chain |
The lab
python3 cve-2026-59273-spring-security-elmatcher-Abraxas-Labs.pyor directly:
cd lab && ./run.shNo server, no database, no Docker. The runner resolves both pins from Maven Central, compiles once per version, and prints one RESULT line each. It exports -Djava.net.preferIPv4Stack=true, because some networks hand the JVM an AAAA record with no working IPv6 route and Maven then reports No route to host. That flag is harmless where IPv6 works, and it is the only environment wrinkle in the whole thing.
Other affected lines:
VULN=7.0.8 FIXED=7.0.9 ./run.shThe fix
Upgrade to 7.1.3 or 7.0.9. On Spring Boot 4.x, Boot 4.1.3 or 4.0.10 pulls the corresponding Spring Security. The 6.5, 6.4, 5.8, and 5.7 fixes are commercial support releases, which means installs on those lines stay exposed until they have a support agreement or an upgrade path off them. That is the part of this that will take months rather than days.
There is no configuration workaround in the advisory. If you cannot upgrade, the thing to check is the one this harness checks: does anything in the application bind outside input onto a RequestMatcher-typed property. If nothing does, this CVE does not have a path into your process.
For anyone writing the regression test, use a type reference. An instance-method probe will pass on the patched line and tell you nothing.