Skip to content

Commit 580ccbc

Browse files
authored
Merge branch 'develop' into develop
2 parents 3807f52 + ddd2cda commit 580ccbc

File tree

74 files changed

+3121
-555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3121
-555
lines changed

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

10-
**Describe the bug**
9+
[**NOTE:** Please do NOT just ask general questions here as they will _not_ be answered. Instead, please use the GitHub Discussions and create a new topic under 'Questions and Answers". Also, please delete the instructions and replace them with actual text and delete the sections that are not relevant.]
10+
11+
#### Describe the bug
1112
A clear and concise description of what the bug is.
1213

13-
**Specify what ESAPI version(s) you are experiencing this bug in*
14-
This is especially important if it is not the latest version of ESAPI.
14+
#### Specify what ESAPI version(s) you are experiencing this bug in
15+
This is especially important if it is not the latest version of ESAPI. Also, if you are using the Jakarta version (e.g., '<classifier>jakarta</classier>'), then please note that as well.
1516

16-
**To Reproduce**
17+
#### To Reproduce
1718
List the steps to reproduce the behavior or (ideally) attach a small JUnit test to reproduce the problem. Please _be specific_.
1819
1. Go to '...'
1920
2. Click on '....'
2021
3. Scroll down to '....'
2122
4. See error
23+
Note also any specific configuration changes that are needed to replicate the problem. That is especially important if you are not using the default configuration files (ESAPI.properties, validation.properties, antisamy-esapi.xml, etc.)
2224

23-
**Expected behavior**
25+
#### Expected behavior
2426
A clear and concise description of what you expected to happen.
2527

26-
**Screenshots**
28+
#### Screenshots
2729
If applicable, add screenshots to help explain your problem.
2830
[**NOTE:** Please do NOT just ask general questions here as they will _not_ be answered. Instead, please use the GitHub Discussions and create a new topic under 'Questions and Answers".
2931
Please delete any irrelevant portion of this template before submitting your GitHub issue. Thanks.]
3032

31-
**Platform environment (please complete the following information):**
33+
#### Platform environment (please complete the following information)
3234
- OS: [e.g. iOS]
3335
- Browser [e.g. chrome, safari]
3436
- JDK version used with ESAPI
3537

36-
**Additional context**
38+
#### Additional context
3739
Add any other context about the problem here.
3840
If known, please select the label corresponding to the affected ESAPI component.

Diff for: .github/ISSUE_TEMPLATE/enhancement-request.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@ about: Suggest an enhancment for this project
44
title: ''
55
labels: enhancement
66
assignees: ''
7-
87
---
98

10-
[**NOTE:** Please do NOT just ask general questions here as they will _not_ be answered. Instead, please use the GitHub Discussions and create a new topic under 'Questions and Answers".
11-
Please delete any irrelevant portion of this template before submitting your GitHub issue. Thanks.]
9+
[**NOTE:** Please do NOT just ask general questions here as they will _not_ be answered. Instead, please use the GitHub Discussions and create a new topic under 'Questions and Answers". Please delete any irrelevant portion of this template before submitting your GitHub issue. Thanks.]
1210

13-
**Is your feature request related to a problem? Please describe.**
11+
#### Is your feature request related to a problem? Please describe.
1412
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1513

16-
**Describe the solution you'd like**
14+
#### Describe the solution you'd like
1715
A clear and concise description of what you want to happen. Note that this may include some appropriate type of documentation that is lacking or unclear.
1816

19-
**Describe alternatives you've considered including other security libraries**
17+
#### Describe alternatives you've considered including other security libraries
2018
A clear and concise description of any alternative solutions or features you've considered.
2119

22-
**Additional context**
20+
#### Additional context
2321
Add any other context or screenshots about the feature request here.

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/target
33
/.settings/**
44
.classpath
5+
.java-version
56
.project
67
*.swp
78
*~
@@ -16,3 +17,4 @@ bin/
1617
ciphertext-portable.ser
1718
ReferenceEncryptedProperties.test.txt
1819
test.out
20+
.DS_Store

Diff for: CONTRIBUTING-TO-ESAPI.txt

+20-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ A Special Note on GitHub Authentication:
1212
Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
1313
for details and plan accordingly.
1414

15+
A Special Note Regarding Making Commits for PRs
16+
Shortly after the 2.5.1.0 ESAPI release in late November 2022, the ESAPI
17+
team decided to lock down the 'develop' amd 'main' branches. Merges from
18+
PRs are done to the 'develop' branch. That means that if you intend to
19+
contribute to ESAPI, you must be signing your commits. Please see the
20+
GitHub instructions at
21+
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
22+
for details.
23+
1524

1625
Finding Something Interesting to Work on:
1726

@@ -54,7 +63,7 @@ Required Software:
5463
this.]
5564

5665
Building ESAPI:
57-
https://www.owasp.org/index.php/ESAPI-Building briefly discusses how to
66+
https://github.com/ESAPI/esapi-java-legacy/wiki/Building-ESAPI briefly discusses how to
5867
build ESAPI via Maven.
5968

6069
Also https://github.com/ESAPI/esapi-java-legacy/wiki/Using-ESAPI-for-Java-with-Eclipse
@@ -81,7 +90,10 @@ Steps to work with ESAPI:
8190
'issue-#' where '#' is the GitHub issue # is will be working on, but
8291
you can call it whatever. E.g.,
8392
git checkout -b issue-#
84-
4. Work on the GitHub issue on this newly created issue-# branch.
93+
4. Work on the GitHub issue on this newly created issue-# branch. Be sure
94+
that you also create new JUnit tests as required that confirm that the
95+
issue is corrected, or if you are introducing new functionality, ensure
96+
that functionality is sufficiently covered.
8597
5. Make sure everything builds correctly and all the JUnit tests pass
8698
('mvn test'). [Note: There are some known issues with test failures if
8799
your are running under Windows and your local ESAPI Git repo located
@@ -104,11 +116,16 @@ Steps to work with ESAPI:
104116
$ git remote -v | grep origin # Confirm 'origin' refers to YOUR PERSONAL GitHub repo
105117
$ git push origin issue-444 # Push the committed changes on the 'issue-444' branch
106118
9. Go to your personal, forked ESAPI GitHub repo (web interface) and create a
107-
'Pull Request' from your 'issue-#' branch.
119+
'Pull Request' (PR) from your 'issue-#' branch.
108120
10. Back on your local personal laptop / desktop, merge your issue branch with
109121
your local 'develop' branch. I.e.,
110122
$ git checkout develop
111123
$ git merge issue-444
124+
11. Do not remove your branch on your forked repository until your PR from your
125+
branch has been merged into the ESAPI/esapi-java/legacy 'develop' branch.
126+
Note at least one the 3 main contributors on will review your commits before
127+
merging them and they may do a formal code review and request further changes.
128+
Once they are satisfied, they will merge your PR.
112129

113130
In theory, you can do all this 'git' magic from Eclipse and presumably other
114131
IDEs like Oracle NetBeans or IntelliJ IDEA). From Eclipse, it is right-click

Diff for: README.md

+24-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ OWASP® ESAPI (The OWASP Enterprise Security API) is a free, open source, web ap
1414
</tr>
1515
</table>
1616

17+
# Special note regarding Spring Boot 3, Spring 6, Tomcat 10 and other applications / libraries requiring Jakarta EE
18+
<table border=<5>
19+
<tr>
20+
<td>
21+
<b>IMPORTANT:</b> We are aware that all versions of ESAPI (unless you are using very select parts) do not work with Jakarta EE. Jakarta EE relies on <b>jakarta.servlet-api</b>. ESAPI is built to use <b>javax.servlet-api</b>. This causes things like Spring Boot 3, Spring 6, Tomcat 10, the latest version of Jetty, etc. to fail to load certain (well, many) ESAPI classes. The reason for this is that the package names between these 2 libraryes are different! The dependency <b>javax.servlet-api</b> has a package namespace of <code>javax.servlet</code>. The <b>jakarta.servlet-api</b> library is using the package namespace of <code>jakarta.servlet</code>. So references to things like <code>ServletRequest</code>, <code>ServletResponse</code>, etc. in ESAPI are using <code>javax.servlet.ServletRequest</code> and <code>javax.servlet.ServletResponse</code> respectively. We cannot make it work for both at once and we will not stop supporting <b>javax.servlet-api</b>, which is what most of our existing ESAPI clients are using.
22+
<p>
23+
Therefore <b>PLEASE STOP</b> sending us emails and/or creating GitHub issues regarding this! Instead, please
24+
read ongoing the GitHub discussion https://github.com/ESAPI/esapi-java-legacy/discussions/768 for further details.
25+
</p>
26+
</td>
27+
</tr>
28+
</table>
29+
1730
# A word about ESAPI vulnerabilities
1831
A summary of all the vulnerabilities that we have written about in either the
1932
ESAPI Security Bulletins or in the GitHub Security Advisories may be found
@@ -32,7 +45,7 @@ Development for the "next generation" of ESAPI (starting with ESAPI 3.0), will b
3245
GitHub repository at [https://github.com/ESAPI/esapi-java](https://github.com/ESAPI/esapi-java).
3346

3447
**IMPORTANT NOTES:**
35-
* The default branch for ESAPI legacy is the 'develop' branch (rather than the 'main' (formerly 'master') branch), where future development, bug fixes, etc. are now being done. The 'main' branch is now marked as "protected"; it reflects the latest stable ESAPI release (2.5.0.0 as of this date). Note that this change of making the 'develop' branch the default may affect any pull requests that you were intending to make.
48+
* The default branch for ESAPI legacy is the 'develop' branch (rather than the 'main' (formerly 'master') branch), where future development, bug fixes, etc. are now being done. The 'main' branch is now marked as "protected"; it reflects the latest stable ESAPI release (2.5.3.1 as of this date). Note that this change of making the 'develop' branch the default may affect any pull requests that you were intending to make.
3649
* Also, the *minimal* baseline Java version to use ESAPI is now Java 8. (This was changed from Java 7 during the 2.4.0.0 release.)
3750
* Support was dropped for Log4J 1 during ESAPI 2.5.0.0 release. If you need it, configure it via SLF4J. See the
3851
[2.5.0.0 release notes](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.5.0.0-release-notes.txt)
@@ -66,7 +79,7 @@ link to the specific release notes.
6679
Starting with release 2.4.0.0, Java 8 or later is required.
6780

6881
# Locating ESAPI Jar files
69-
The [latest ESAPI release](https://github.com/ESAPI/esapi-java-legacy/releases/latest) is 2.5.0.0.
82+
The [latest ESAPI release](https://github.com/ESAPI/esapi-java-legacy/releases/latest) is 2.5.3.1.
7083
All the *regular* ESAPI jars, with the exception of the ESAPI configuration
7184
jar (i.e., esapi-2.#.#.#-configuration.jar) and its associated detached
7285
GPG signature, are available from Maven Central. The ESAPI configuration
@@ -88,6 +101,15 @@ to be using such classes directly in your code. At the ESAPI team's discretion,
88101
it will also not apply for any known exploitable vulnerabilities for which
89102
no available workaround exists.
90103

104+
## Exceptions to Deprecation Policy
105+
We will make some exceptions to the normal 2 year period. In particular, in the
106+
cases were we believe that keeping a specific deprecated class or method around
107+
can introduce security issues (generally because many of you have a habit of
108+
completely ignoring deprecation warnings), we sometimes will shorten that 2 year
109+
period. When we decide to do that, we will announce that as part of the
110+
deprecation message.
111+
112+
## Log4J 1.x Removal
91113
**IMPORTANT NOTES:** As of ESAPI 2.5.0.0, all the Log4J 1.x related code
92114
has been removed from the ESAPI code base (with the exception of some
93115
references in documentation). If you must, you still should be able to

Diff for: SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7-
| 2.4.0.0 (latest) | :white_check_mark: |
8-
| 2.1.0.1-2.3.0.0 | :x:, upgrade to latest release |
7+
| 2.5.1.0 (latest) | :white_check_mark: |
8+
| 2.1.0.1-2.5.0.0 | :x:, upgrade to latest release |
99
| <= 1.4.x | :x:, no longer supported AT ALL |
1010

1111
## Reporting a Vulnerability

Diff for: Vulnerability-Summary.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ was provided in the description of the CVE.
2323
|[7](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin7.pdf)|Improper validation (or, specifically, not using parameterized SQL queries) of a SQL statement makes Apache Log4j JDBCAppender vulnerable to SQL Injection. This potentially could allow attackers to execute unintended SQL statements by entering data that is logged via Log4J 1.|[CWE-89](https://cwe.mitre.org/data/definitions/89.html)|[CVE-2022-23305](https://nvd.nist.gov/vuln/detail/CVE-2022-23305)|All versions of ESAPI are vulnerable and impacted if your application is doing both of the following:1) Using the deprecated ESAPI Log4J logging.2) You have changed your default log4j.xml (or log4j.properties) file to use JDBCAppender.|None. ESAPI uses ConsoleAppender as the default appender even if ESAPI logging is configured to use Log4J 1.|
2424
|[8](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin8.pdf)<br/>[GHSA-q77q-vx4q-xx6q](https://github.com/ESAPI/esapi-java-legacy/security/advisories/GHSA-q77q-vx4q-xx6q)|Improper sanitization of user-controlled input permitted by an incorrect regular expression in an ESAPI configuration file can result in that input being unintentionally executing javascript: URLs, resulting in Cross-Site Scripting (XSS).|[CWE-79](https://cwe.mitre.org/data/definitions/79.html)|[CVE-2022-24891](https://nvd.nist.gov/vuln/detail/CVE-2022-24891)|A malformed regular expression in ESAPI’s default AntiSamy policy file, “antisamy-esapi.xml”, accidentally allowed the “:” character to match as a part of the “onsiteURL” regular expression. This allowed 'javascript:' pseudo-URIs to slip past ESAPI which could result in XSS vulnerabilities. Note that this vulnerability dates back at least to the ESAPI 1.4 release.|ESAPI 1.4 and all ESAPI 2.x versions before 2.3.0.0.|
2525
|[9](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin9.pdf)|Apache Log4j 1’s JMSSink is vulnerable to insecure deserialization of untrusted logged data when the attacker has write access to the Log4j configuration or if the configuration references an LDAP service that the attacker has access to. This may resulting in remote code execution.|[CWE-502](https://cwe.mitre.org/data/definitions/502.html)|[CVE-2022-23302](https://nvd.nist.gov/vuln/detail/CVE-2022-23302)|Remote Code Execution is possible.|None. ESAPI uses ConsoleAppender as the default appender even if ESAPI logging is configured to use Log4J 1.|
26-
|[10](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin10.pdf)|There is an RCE flaw caused by an insecure deserialization vulnerability in Apache Chainsaw, a Java-based GUI log viewer. CVE-2020-9493 identified a deserialization issue that was present in Apache Chainsaw 2.x prior to 2.1.0. However, prior to Chainsaw V2.0, Chainsaw was a component of Apache Log4j 1.2.x where the same issue exists and remains unfixed.|[CWE-502](https://cwe.mitre.org/data/definitions/502.html)|[CVE-2022-23307](https://nvd.nist.gov/vuln/detail/CVE-2022-23307)|Remote Code Execution is possible if you are running Apache Chainsaw 1.x from the Apache Log4J 1.2.x jar..|None. ESAPI uses ConsoleAppender as the default appender even if ESAPI logging is configured to use Log4J 1.|
26+
|[10](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin10.pdf)|There is an RCE flaw caused by an insecure deserialization vulnerability in Apache Chainsaw, a Java-based GUI log viewer. CVE-2020-9493 identified a deserialization issue that was present in Apache Chainsaw 2.x prior to 2.1.0. However, prior to Chainsaw V2.0, Chainsaw was a component of Apache Log4j 1.2.x where the same issue exists and remains unfixed.|[CWE-502](https://cwe.mitre.org/data/definitions/502.html)|[CVE-2022-23307](https://nvd.nist.gov/vuln/detail/CVE-2022-23307)|Remote Code Execution is possible if you are running Apache Chainsaw 1.x from the Apache Log4J 1.2.x jar.|None. ESAPI uses ConsoleAppender as the default appender even if ESAPI logging is configured to use Log4J 1.|
2727
|[GHSA-8m5h-hrqm-pxm2](https://github.com/ESAPI/esapi-java-legacy/security/advisories/GHSA-8m5h-hrqm-pxm2)|The default implementation of `Validator.getValidDirectoryPath(String, String, File, boolean)` may incorrectly treat the tested input string as a child of the specified parent directory. This potentially could allow control-flow bypass checks to be defeated if an attack can specify the entire string representing the 'input' path.|[CWE-22](https://cwe.mitre.org/data/definitions/22.html)|[CVE-2022-23457](https://nvd.nist.gov/vuln/detail/CVE-2022-23457)|Control-flow bypass may be possible.|ESAPI 2.x, prior to the ESAPI 2.3.0.0 release. Version 2.3.0.0 and later are patched.|
28+
|[11](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin11.pdf)|There is a DoS vulerablity in the FileUploadBase class of Apache Commons FileUpload for releases prior to 1.5. That DoS vulnerability is caused by not limiting the number of files that could be uploaded per single request.|[CWE-770](https://cwe.mitre.org/data/definitions/770.html)|[CVE-2023-24998](https://nvd.nist.gov/vuln/detail/CVE-2023-24998)|None. ESAPI uses a subclass of the affected FileUpladBase abstract class from Apache Commons FileUpload to which a new setFileCountMax() method was added.|Addressed in ESAPI 2.5.2.0 and later.|
29+
|[GHSA-r68h-jhhj-9jvm](https://github.com/ESAPI/esapi-java-legacy/security/advisories/GHSA-r68h-jhhj-9jvm)|Decribes why ESAPI's Validator.isValidSafeHTML is being deprecated and will be removed one year after the ESAPI 2.5.3.0 release date.|[CWE-80](https://cwe.mitre.org/data/definitions/80.html)|N/A (no CVE)|XSS may be possible depending on how the method is used.|All ESAPI versions (all 1.x and 2.x versions). No patch is available until the methods are deleted one year after the ESAPI 2.5.3.0 release date.|
30+
31+

0 commit comments

Comments
 (0)