Skip to content

TestNG using vulnerable jQuery-UI version in Maven dependency (CVE-2022-31160) #2972

@cristinac42

Description

@cristinac42

TestNG utilizes jQuery version 3.6.1 as a Maven dependency. However, this version of jQuery, in turn, depends on an earlier version of jQuery-UI (prior to 1.13.2) that contains a security vulnerability known as CVE-2022-31160.

CVE Description:
jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of jQuery. Versions prior to 1.13.2 are potentially vulnerable to cross-site scripting. Initializing a checkboxradio widget on an input enclosed within a label treats the parent label contents as the input label. Calling .checkboxradio( "refresh" ) on such a widget, along with initial HTML containing encoded HTML entities, may erroneously decode them. This can lead to the potential execution of malicious JavaScript code. The issue has been addressed in the patched version, jQuery UI 1.13.2. As a mitigation measure, modifying the initial HTML by wrapping all non-input contents of the label in a span is recommended.

Affected Component:
TestNG's Maven dependency on jQuery 3.6.1, which includes a vulnerable version of jQuery-UI prior to 1.13.2.

Impact:
The utilization of the vulnerable jQuery-UI version within the TestNG project may expose the application to cross-site scripting attacks. An attacker could potentially exploit this vulnerability to inject and execute arbitrary JavaScript code within the application context, compromising its integrity and potentially compromising user data.

Solution Proposal:
Since the vulnerable jQuery-UI version is imposed by the dependency on jQuery 3.6.1, it is suggested to update the jQuery dependency to a version that includes jQuery-UI 1.13.2 or above. By utilizing a patched version, the application can mitigate the risk associated with this vulnerability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions