Skip to content

Releases: nahsra/antisamy

Release Version 1.7.6

06 Jul 14:35
08ab2b9
Compare
Choose a tag to compare

This is a minor bug fix release to address issue #453.

In addition, a number of libraries and plugins were upgraded.

Release version 1.7.5

02 Feb 15:45
12a2e31
Compare
Choose a tag to compare

This release addresses the vulnerability documented in GHSA-2mrq-w8pv-5pvq. AntiSamy versions prior to v1.7.5 are subject to mutation XSS (mXSS) vulnerability when preserving comments. - https://www.cvedetails.com/cve/CVE-2024-23635.

In addition, a number of libraries and plugins were upgraded.

Note: The upgrade in the HTML parser may alter outputs compared to 1.7.4 and before. This may impact regression tests that involve AntiSamy if they are too strict when comparing a resulting output with the expected one.

Release version 1.7.4

06 Oct 23:23
45c78f1
Compare
Choose a tag to compare

This release addresses the vulnerability documented in CVE-2023-43643. AntiSamy versions prior to v1.7.4 are subject to mutation XSS (mXSS) vulnerability when preserving comments. - https://www.cvedetails.com/cve/CVE-2023-43643.

In addition, a number of libraries and plugins were upgraded, including one with a known vulnerability. Specifically, AntiSamy 1.7.4 upgraded to batik-css v1.17 because batik-css:1.16 is subject to https://www.cvedetails.com/cve/CVE-2022-44729.

Note: The upgrade in the HTML parser may alter outputs compared to 1.7.3 and before. This may impact in regression tests that involve AntiSamy if they are too strict when comparing a resulting output with the expected one.

Release version 1.7.3

12 Apr 13:09
51a73aa
Compare
Choose a tag to compare

This release simply upgrades a number of dependencies, including one with a known CVE. Versions of org.htmlunit:neko-htmlunit prior to 3.0.0 used by AntiSamy 1.7.2 is subject to CVE-2023-26119.

Release version 1.7.2

18 Nov 16:03
Compare
Choose a tag to compare

This release simply upgrades a number of dependencies, including one with known CVEs. The previous version of batik-css (1.14) used by AntiSamy 1.7.1 has two CVEs: CVE-2022-42890, CVE-2022-41704.

Release version 1.7.1

06 Sep 22:42
Compare
Choose a tag to compare

This release addresses the following issues:

  1. Documentation Improvements: Clarifying that relying on getErrorMessages() or getNumberOfErrors() is UNSAFE.

There has been much confusion about the getErrorMessages() method. The getErrorMessages() method (nor getNumberOfErrors()) does not subtly answer the question "is this safe input?" in the affirmative if it returns an empty list. You must always use the sanitized input and there is no way to be sure the input passed in had no attacks.

We had already added a note about this in the README for AntiSamy 1.7.0, but we have now added similar information to the Javadoc for all the related methods. That way if a developer is reading the Javadoc, they are more likely to notice that these methods are purely informational, and CANNOT be relied on for security. Only CleanResults.getCleanHTML() can be relied on to provide safe/clean HTML to send back to the user's browser.

  1. Announcing plan to deprecate support for external stylesheets

The AntiSamy team has decided that supporting the ability to allow embedded remote CSS is dangerous and so we are deprecating this feature and it will be removed in a future release. It is expected that there are very few, if any, users of this feature.

We have added a log WARNing if this feature is invoked. If you are using this API, please disable/remove this feature by switching to the primary CssScanner() constructor that does not enable this feature, or dropping direct use of this constructor because, by default, this feature it not enabled.

  1. Minor Bug #200: AntiSamy converting single quotes to double quotes for font-family which is causing issue while rendering

This issue was fixed in this release. See the issue ticket for more details.

Release version 1.7.0

16 Jul 22:33
ba855ca
Compare
Choose a tag to compare

This release eliminates everything deprecated in the 1.6.8 release, and includes a few minor plugin and library updates, but otherwise no other changes. The details of the things removed are documented in the README and issue #195. The README describes the new APIs that replace any deprecated APIs that were removed. AntiSamy 1.7.0 requires Java 8+.

Release version 1.6.8

24 Apr 13:59
Compare
Choose a tag to compare

This release simply upgrades net.sourceforge.htmlunit:neko-htmlunit to version 2.61.0 to eliminate a DOS vulnerability in that library discovered in version 2.60.0 and prior (https://www.cvedetails.com/cve/CVE-2022-29546).

Release version 1.6.7

13 Apr 22:11
a42865c
Compare
Choose a tag to compare

This release addresses a minor issue in the security fixes implemented in 1.6.6. While those fixes addressed most of the security concerns in the security issue reported to us by the researcher, our fix had a minor bug that allowed something to sneak through. This release fixes that, and includes the changes from 1.6.6.1 that compile AntiSamy.jar to Java 7 bytecode.

It specifically addresses CVE-2022-29577, which is the complete fix to: CVE-2022-28367: AntiSamy before 1.6.6 allows XSS via HTML tag smuggling on STYLE content. - https://www.cvedetails.com/cve/CVE-2022-29577.

Release version 1.6.6.1

07 Apr 23:37
Compare
Choose a tag to compare

The 1.6.6.1 release corrects a minor issue in the 1.6.6 release:

We accidentally upgraded the byte code generated for antisamy.jar to be Java 8, when it can still be Java 7. So this release generates a Java 7 jar file instead. This allows Java 7 projects to use AntiSamy 1.6.6.1 by doing the following:

Exclude the 2 Java 8 dependencies we currently use:

  • commons-o:commons-io:2.11.0
  • net.sourceforge.htmlunit:neko-htmlunit:2.60.0

You then import and use the last Java 7 versions of these libraries:

  • commons-io:commons-io:2.6
  • net.sourceforge.htmlunit:neko-htmlunit:2.24

A few plugins were upgraded and some were added but none of the dependencies were changed.


The previous 1.6.6 release addressed the following issues:

  1. This release fixes 3 security issues reported by researcher Hyeongkwan Lee

CVEs for these have not been created yet, so we are not providing any details on the issues at this time.

  1. Enhancement #147: Add require-closing-tags to default AntiSamy policy file

  2. Bug #151: Change in behavior between 1.6.4 and 1.6.5 for getErrorMessages

We accidentally stopped propagating an errorMessages parameter in 1 API. This is now fixed.

NOTIFICATION 1: This 1.6.6 release has 2 dependencies which require Java 8, although the AntiSamy source code itself still only requires Java 7.

NOTIFICATION 2: The 1.7.0 release will drop support for several things deprecated in the 1.6.x series of releases.

a) AntiSamy 1.6.0 introduced XML schema validation for AntiSamy policy files to address issue #58. In all the 1.6.X releases, enforcement of schema validation is optional, with warnings generated to indicate it should be enforced. Starting with AntiSamy 1.7.0 this will no longer be optional.

To support this new feature, but keep it optional, 2 new Policy class methods were created, and immediately deprecated:

public static boolean getSchemaValidation()
public static void setSchemaValidation(boolean enable)

These two methods will be dropped in the 1.7.0 release, and any AntiSamy policy files that fail schema validation will result in an error and have to be fixed.

b) AntiSamy 1.6.5 changed some APIs. Specifically:

These constructors are now @deprecated:

public CssHandler(Policy policy, LinkedList embeddedStyleSheets, List errorMessages, ResourceBundle messages)
public CssHandler(Policy policy, LinkedList embeddedStyleSheets, List errorMessages, String tagName, ResourceBundle messages)

And are being replaced with:

public CssHandler(Policy policy, List errorMessages, ResourceBundle messages)
public CssHandler(Policy policy, List errorMessages, ResourceBundle messages, String tagName) <-- Notice that the tagName is now the last parameter in the new API.

Both constructors drop the 2nd parameter (the queue of stylesheets imported), as that queue is now created inside this constructor. A reference to this queue (if needed) can be retrieved by using the new method:

public LinkedList getImportedStylesheetsURIList()

c) This 1.6.6 release deprecates support for Xhtml. As such, the following are deprecated:

The constant: Policy.USE_XHTML = "useXHTML";
The method: InternalPolicy.isXhtml()
The entire class: org/owasp/validator/html/scan/ASXHTMLSerializer.java

We plan to remove everything deprecated in the 1.7.0 release.