Skip to content

Commit ce2ecdd

Browse files
committed
New release notes for ESAPI 2.2.2.0
1 parent c76fa98 commit ce2ecdd

File tree

1 file changed

+250
-0
lines changed

1 file changed

+250
-0
lines changed
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
Release notes for ESAPI 2.2.2.0
2+
Release date: 2020-November-27
3+
Project leaders:
4+
-Kevin W. Wall <kevin.w.wall@gmail.com>
5+
-Matt Seil <matt.seil@owasp.org>
6+
7+
Previous release: ESAPI 2.2.1.1, 2020-July-26
8+
9+
10+
Executive Summary: Important Things to Note for this Release
11+
------------------------------------------------------------
12+
13+
This is a patch release with the primary intent of updating some dependencies with known vulnerabilities. The main vulnerability that was remediated was CVE-2020-13956, which was a vulnerability introduced through the ESAPI transitive dependency org.apache.httpcomponents:httpclient:4.5.12, potentially exposed through org.owasp.antisamy:antisamy:1.5.10. Updating to AntiSamy 1.5.11 remediated that issue. In addition, that update to AntiSamy 1.5.11 also addressed AntiSamy issue #48 (https://github.com/nahsra/antisamy/issues/48), which was a low risk security issue that potentially could be exposed via phishing.
14+
15+
For those of you using a Software Configuration Analysis (SCA) services such as Snyk, BlackDuck, Veracode SourceClear, OWASP Dependency Check, etc., you might notice that there is vulnerability in xerces:xercesImpl:2.12.0 that ESAPI uses (also a transitive dependency) that is similar to CVE-2020-14621. Unfortunately there is no official patch for this in the regular Maven Central repository. Further details are described in Security Bulletin #3, which is viewable here
16+
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin3.pdf
17+
and associated with this release on GitHub. Manual workarounds possible. See the security bulletin for further details.
18+
19+
20+
=================================================================================================================
21+
22+
Basic ESAPI facts
23+
-----------------
24+
25+
ESAPI 2.2.1.1 release:
26+
211 Java source files
27+
4312 JUnit tests in 134 Java source files
28+
29+
ESAPI 2.2.2.0 release:
30+
212 Java source files
31+
4313 JUnit tests in 135 Java source files
32+
33+
10 GitHub Issues closed in this release, including those we've decided not to fix (marked '(wontfix)').
34+
(Reference: https://github.com/ESAPI/esapi-java-legacy/issues?q=is%3Aissue+state%3Aclosed+updated%3A%3E%3D2020-07-26)
35+
36+
Issue # GitHub Issue Title
37+
----------------------------------------------------------------------------------------------
38+
303 - HTMLEntityCodec destroys 32-bit CJK (Chinese, Japanese and Korean) characters
39+
561 - Update ESAPI-release-steps.odt to note how to do 'Release' on GitHub
40+
566 - API doc comments are not shown when using ESAPI in Intellij Idea (wontfix)
41+
567 - Release 2.2.1.1 Not Loading Properties in dependant JARs
42+
568 - encoder-esapi is not aware of changes in esapi 2.2.1.1, making it to crash (wontfix)
43+
569 - Unable to print the proper package and method name
44+
571 - Logger.always() fails to log all the time when ESAPI is using org.owasp.esapi.logging.java.JavaLogFactory
45+
574 - Multiple encoding issue for Google Chrome
46+
577 - ESAPI decodes html entities without trailing ';'
47+
581 - Updates to pom.xml to update AntiSamy and other dependencies
48+
49+
-----------------------------------------------------------------------------
50+
51+
Changes Requiring Special Attention
52+
53+
-----------------------------------------------------------------------------
54+
[If you have already successfully been using ESAPI 2.2.1.0 or later, you probably can skip this section.]
55+
56+
Since ESAPI 2.2.1.0, the new default ESAPI logger is JUL (java.util.logging packages) and we have deprecated the use of Log4J 1.x because we now support SLF4J and Log4J 1.x is way past its end-of-life. We did not want to make SLF4J the default logger (at least not yet) as we did not want to have the default ESAPI use require additional dependencies. However, SLF4J is likely to be the future choice, at least once we start on ESAPI 3.0. A special shout-out to Jeremiah Stacey for making this possible by re-factoring much of the ESAPI logger code. Note, the straw that broke the proverbial camel's back was the announcement of CVE-2019-17571 (rated Critical), for which there is no fix available and likely will never be.
57+
58+
However, if you try to juse the new ESAPI 2.2.1.0 or later logging you will notice that you need to change ESAPI.Logger and also possibly provide some other properties as well to get the logging behavior that you desire.
59+
60+
To use ESAPI logging in ESAPI 2.2.1.0 (and later), you will need to set the ESAPI.Logger property to
61+
62+
org.owasp.esapi.logging.java.JavaLogFactory - To use the new default, java.util.logging (JUL)
63+
org.owasp.esapi.logging.log4j.Log4JLogFactory - To use the end-of-life Log4J 1.x logger
64+
org.owasp.esapi.logging.slf4j.Slf4JLogFactory - To use the new (to release 2.2.0.0) SLF4J logger
65+
66+
In addition, if you wish to use JUL for logging, you *MUST* supply an "esapi-java-logging.properties" file in your classpath. This file is included in the 'esapi-2.2.2.0-configuration.jar' file provided under the 'Assets' section of the GitHub Release at
67+
https://github.com/ESAPI/esapi-java-legacy/releases/esapi-2.2.2.0
68+
69+
Unfortunately, there was a logic error in the static initializer of JavaLogFactory (now fixed in this release) that caused a NullPointerException to be thrown so that the message about the missing "esapi-java-logging.properties" file was never seen.
70+
71+
If you are using JavaLogFactory, you will also want to ensure that you have the following ESAPI logging properties set:
72+
# Set the application name if these logs are combined with other applications
73+
Logger.ApplicationName=ExampleApplication
74+
# If you use an HTML log viewer that does not properly HTML escape log data, you can set LogEncodingRequired to true
75+
Logger.LogEncodingRequired=false
76+
# Determines whether ESAPI should log the application name. This might be clutter in some single-server/single-app environments.
77+
Logger.LogApplicationName=true
78+
# Determines whether ESAPI should log the server IP and port. This might be clutter in some single-server environments.
79+
Logger.LogServerIP=true
80+
# LogFileName, the name of the logging file. Provide a full directory path (e.g., C:\\ESAPI\\ESAPI_logging_file) if you
81+
# want to place it in a specific directory.
82+
Logger.LogFileName=ESAPI_logging_file
83+
# MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)
84+
Logger.MaxLogFileSize=10000000
85+
# Determines whether ESAPI should log the user info.
86+
Logger.UserInfo=true
87+
# Determines whether ESAPI should log the session id and client IP.
88+
Logger.ClientInfo=true
89+
90+
See GitHub issue #560 for additional details.
91+
92+
93+
Related to that aforemented Log4J 1.x CVE and how it affects ESAPI, be sure to read
94+
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin2.pdf
95+
which describes CVE-2019-17571, a deserialization vulnerability in Log4J 1.2.17. ESAPI is *NOT* affected by this (even if you chose to use Log4J 1 as you default ESAPI logger). This security bulletin describes why this CVE is not exploitable as used by ESAPI.
96+
97+
98+
Finally, while ESAPI still supports JDK 7 (even though that too is way past end-of-life), the next ESAPI release will move to JDK 8 as the minimal baseline. (We already use Java 8 for development but still to Java 7 source and runtime compatibility.)
99+
100+
-----------------------------------------------------------------------------
101+
102+
Remaining Known Issues / Problems
103+
104+
-----------------------------------------------------------------------------
105+
If you use Java 7 (the minimal Java baseline supported by ESAPI) and try to run 'mvn test' there is one test that fails. This test passes with Java 8. The failing test is:
106+
107+
[ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.203 s
108+
<<< FAILURE! - in org.owasp.esapi.crypto.SecurityProviderLoaderTest
109+
[ERROR] org.owasp.esapi.crypto.SecurityProviderLoaderTest.testWithBouncyCastle
110+
Time elapsed: 0.116 s <<< FAILURE!
111+
java.lang.AssertionError: Encryption w/ Bouncy Castle failed with
112+
EncryptionException for preferred cipher transformation; exception was:
113+
org.owasp.esapi.errors.EncryptionException: Encryption failure (unavailable
114+
cipher requested)
115+
at
116+
org.owasp.esapi.crypto.SecurityProviderLoaderTest.testWithBouncyCastle(Security
117+
ProviderLoaderTest.java:133)
118+
119+
I will spare you all the details and tell you that this has to do with Java 7 not being able to correctly parse the signed Bouncy Castle JCE provider jar. More details are available at:
120+
https://www.bouncycastle.org/latest_releases.html
121+
and
122+
https://github.com/bcgit/bc-java/issues/477
123+
I am sure that there are ways of making Bouncy Castle work with Java 7, but since ESAPI does not rely on Bouncy Castle (it can use any compliant JCE provider), this should not be a problem. (It works fine with the default SunJCE provider.) If it is important to get the BC provider working with the ESAPI Encryptor and Java 7, then open a GitHub issue and we will take a deeper look at it and see if we can suggest something.
124+
125+
126+
127+
Another problem is if you run 'mvn test' from the 'cmd' prompt (and possibly PowerShell as well), you will get intermittent failures (generally between 10-25% of the time) at arbitrary spots. If you run it again without any changes it will work fine without any failures. We have discovered that it doesn't seem to fail if you run the tests from an IDE like Eclipse or if you redirect both stdout and stderr to a file; e.g.,
128+
129+
C:\code\esapi-java-legacy> mvn test >testoutput.txt 2>&1
130+
131+
We do not know the reason for these failures, but only that we have observed them on Windows 10. If you see this error, please do NOT report it as a GitHub issue unless you know a fix for it.
132+
133+
134+
Lastly, some SCA services may continue to flag vulnerabilties in ESAPI 2.2.2.0 related to log4j 1.2.17 and xerces 2.12.0. We do not believe the way that ESAPI uses either of these in a manner that leads to any exploitable behavior. See the security bulletins
135+
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin2.pdf
136+
and
137+
https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/ESAPI-security-bulletin3.pdf
138+
respectively, for additional details.
139+
140+
-----------------------------------------------------------------------------
141+
142+
Other changes in this release, some of which not tracked via GitHub issues
143+
144+
-----------------------------------------------------------------------------
145+
146+
* Minor updates to README.md file
147+
148+
-----------------------------------------------------------------------------
149+
150+
Developer Activity Report (Changes between release 2.2.1.1 and 2.2.2.0, i.e., between 2020-07-26 and 2020-11-27)
151+
Generated manually (this time) -- all errors are the fault of kwwall and his inability to do simple arithmetic.
152+
153+
Developer Total Total Number # Merged
154+
(GitHub ID) commits of Files Changed PRs
155+
========================================================
156+
jeremiahjstacey 8 6 1
157+
dependabot 1 1 1
158+
kwwall 7 8 0
159+
========================================================
160+
Total PRs: 2
161+
162+
There were also several snyk-bot PRs that were rejected for various reasons, mostly because 1) I was already making the proposed changes and preferred to do them in single commit or 2) there were other reasons for rejecting them (such as the dependency requiring Java 8). The proposed changes that were not outright rejected were included as part of commit a8a79bc5196653500ce664b7b063284e60bddaa0.
163+
164+
-----------------------------------------------------------------------------
165+
166+
CHANGELOG: Create your own. May I suggest:
167+
168+
git log --stat --since=2020-07-26 --reverse --pretty=medium
169+
170+
which will show all the commits since just after the previous (2.2.1.1) release.
171+
172+
-----------------------------------------------------------------------------
173+
174+
Direct and Transitive Runtime and Test Dependencies:
175+
176+
$ mvn dependency:tree
177+
[INFO] Scanning for projects...
178+
[INFO]
179+
[INFO] -----------------------< org.owasp.esapi:esapi >------------------------
180+
[INFO] Building ESAPI 2.2.2.0
181+
[INFO] --------------------------------[ jar ]---------------------------------
182+
[INFO]
183+
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ esapi ---
184+
[INFO] org.owasp.esapi:esapi:jar:2.2.2.0-SNAPSHOT
185+
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
186+
[INFO] +- javax.servlet.jsp:javax.servlet.jsp-api:jar:2.3.3:provided
187+
[INFO] +- com.io7m.xom:xom:jar:1.2.10:compile
188+
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
189+
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
190+
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
191+
[INFO] +- commons-configuration:commons-configuration:jar:1.10:compile
192+
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
193+
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3.3:compile
194+
[INFO] +- log4j:log4j:jar:1.2.17:compile
195+
[INFO] +- org.apache.commons:commons-collections4:jar:4.2:compile
196+
[INFO] +- org.apache-extras.beanshell:bsh:jar:2.0b6:compile
197+
[INFO] +- org.owasp.antisamy:antisamy:jar:1.5.11:compile
198+
[INFO] | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:compile
199+
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
200+
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
201+
[INFO] | \- commons-codec:commons-codec:jar:1.15:compile
202+
[INFO] +- org.slf4j:slf4j-api:jar:1.7.30:compile
203+
[INFO] +- commons-io:commons-io:jar:2.6:compile
204+
[INFO] +- org.apache.xmlgraphics:batik-css:jar:1.13:compile
205+
[INFO] | +- org.apache.xmlgraphics:batik-shared-resources:jar:1.13:compile
206+
[INFO] | +- org.apache.xmlgraphics:batik-util:jar:1.13:compile
207+
[INFO] | | +- org.apache.xmlgraphics:batik-constants:jar:1.13:compile
208+
[INFO] | | \- org.apache.xmlgraphics:batik-i18n:jar:1.13:compile
209+
[INFO] | +- org.apache.xmlgraphics:xmlgraphics-commons:jar:2.4:compile
210+
[INFO] | \- xml-apis:xml-apis-ext:jar:1.3.04:compile
211+
[INFO] +- xalan:xalan:jar:2.7.2:compile
212+
[INFO] | \- xalan:serializer:jar:2.7.2:compile
213+
[INFO] +- xerces:xercesImpl:jar:2.12.0:compile
214+
[INFO] +- xml-apis:xml-apis:jar:1.4.01:compile
215+
[INFO] +- com.github.spotbugs:spotbugs-annotations:jar:4.1.4:compile (optional)
216+
[INFO] | \- com.google.code.findbugs:jsr305:jar:3.0.2:compile (optional)
217+
[INFO] +- net.jcip:jcip-annotations:jar:1.0:compile (optional)
218+
[INFO] +- junit:junit:jar:4.13.1:test
219+
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
220+
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.65.01:test
221+
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.7:test
222+
[INFO] | \- org.powermock:powermock-api-support:jar:2.0.7:test
223+
[INFO] | \- org.powermock:powermock-core:jar:2.0.7:test
224+
[INFO] +- org.javassist:javassist:jar:3.25.0-GA:test
225+
[INFO] +- org.mockito:mockito-core:jar:2.28.2:test
226+
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.9.10:test
227+
[INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.9.10:test
228+
[INFO] | \- org.objenesis:objenesis:jar:2.6:test
229+
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.7:test
230+
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:2.0.7:test
231+
[INFO] +- org.powermock:powermock-reflect:jar:2.0.7:test
232+
[INFO] +- org.openjdk.jmh:jmh-core:jar:1.23:test
233+
[INFO] | +- net.sf.jopt-simple:jopt-simple:jar:4.6:test
234+
[INFO] | \- org.apache.commons:commons-math3:jar:3.2:test
235+
[INFO] \- org.openjdk.jmh:jmh-generator-annprocess:jar:1.23:test
236+
[INFO] ------------------------------------------------------------------------
237+
[INFO] BUILD SUCCESS
238+
[INFO] ------------------------------------------------------------------------
239+
[INFO] Total time: 0.749 s
240+
[INFO] Finished at: 2020-11-25T16:55:26-05:00
241+
[INFO] ------------------------------------------------------------------------
242+
243+
-----------------------------------------------------------------------------
244+
245+
Acknowledgments:
246+
Another hat tip to Dave Wichers for promptly releasing AntiSamy 1.5.11. And thanks to Matt Seil, Jeremiah Stacey, and Dave for reviewing these boring release notes and Security Bulletin #3. Despite their assistance, I take full responsibility for any errors.
247+
248+
A special thanks to the ESAPI community from the ESAPI project co-leaders:
249+
Kevin W. Wall (kwwall) <== The irresponsible party for these release notes!
250+
Matt Seil (xeno6696)

0 commit comments

Comments
 (0)