CVE-2021-43853: AjaxNetProfessional AjaxNetProfessional Deserializes Arbitrary JavaScript Objects Vulnerability

HIGH
Advisory Identifier: GHSA-5q7q-qqw2-hjq7
CVSS 8.7
CWE-502 CWE-79
Published
Advisory Summary

CVE-2021-43853 is a HIGH (CVSS 8.7) ajaxnetprofessional deserializes arbitrary javascript objects vulnerability (CWE-502: Deserialization of Untrusted Data) affecting AjaxNetProfessional libraries in the NuGet ecosystem. The issue involves ajaxnetprofessional deserializes arbitrary javascript objects. Remediation is available by upgrading affected packages to version 21.12.22.1.

CVE-2021-43853 at a Glance

CVE Identifier CVE-2021-43853
GHSA Identifier GHSA-5q7q-qqw2-hjq7
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product AjaxNetProfessional
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2021-43853

To remediate this vulnerability, upgrade all affected AjaxNetProfessional dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

AjaxNetProfessional fixed: 21.12.22.1
Upgrade AjaxNetProfessional to 21.12.22.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for AjaxNetProfessional

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-43853, inspect your project dependencies for AjaxNetProfessional:

inspect dependencies for AjaxNetProfessional

Analyze the terminal output to locate any version of AjaxNetProfessional in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 21.12.22.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In AjaxNetProfessional, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Overview Affected versions of this package are vulnerable to Deserialization of Untrusted Data due to the possibility of deserialization of arbitrary JavaScript objects. ### Description Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user within the output it generates without validating or encoding it. XSS effects vary in range from petty nuisance to significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner network. ### Releases Releases before version 21.12.22.1 are affected. Please be careful to download any binary DLL from other web sites, especially we found NuGet packages not owned by us that contain vulnerable versions. ### Workarounds A workaround exists that replaces one of the core JavaScript files embedded in the library. Using a XML configuration allows to replace the default JavaScript code to be replaced with the version on GitHub. ```xml <configuration> <configSections> <sectionGroup name="ajaxNet"> <section name="ajaxSettings" type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true"/> </sectionGroup> </configSections> <ajaxNet> <ajaxSettings> <coreScript>~/ajaxpro-core-fixed.js</coreScript> </ajaxSettings> </ajaxNet> </configuration> ``` Copy the file core.js from the main project folder to your web server root folder and rename that ajaxpro-core-fixed.js. Clients need to refresh the web page to download the changed JavaScript code. ### References Commit fixing the issue: c89e39b9679fcb8ab6644fe21cc7e652cb615e2b Note: the official Ajax.NET Professional (AjaxPro) NuGet package is available here: https://www.nuget.org/packages/AjaxNetProfessional/ ### For more information If you have any questions or comments about this advisory: * Open an issue on this GitHub repository

CVE-2021-43853 Affected AjaxNetProfessional Versions

1 component(s)
Fixed Versions:
21.12.22.1
Product / Package Ecosystem Affected Versions Fixed Version
AjaxNetProfessional
NuGet
< 21.12.22.1
21.12.22.1

References

Frequently Asked Questions

What is CVE-2021-43853?
CVE-2021-43853 is a security vulnerability in AjaxNetProfessional involving AjaxNetProfessional deserializes arbitrary JavaScript objects under CWE-502: Deserialization of Untrusted Data.
Which AjaxNetProfessional versions are affected?
Affected versions include releases prior to 21.12.22.1 across affected packages: AjaxNetProfessional.
What version fixes CVE-2021-43853?
Upgrading to 21.12.22.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is AjaxNetProfessional affected?
Yes, AjaxNetProfessional is affected in releases prior to 21.12.22.1. Upgrade your dependency to 21.12.22.1 or later.
What is the CVSS score of CVE-2021-43853?
CVE-2021-43853 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2021-43853?
CVE-2021-43853 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check NuGet dependencies for CVE-2021-43853?
Run the dependency tree command: 'inspect dependencies for AjaxNetProfessional'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5q7q-qqw2-hjq7",
  "modified" : "2022-08-11T18:44:32Z",
  "published" : "2022-01-06T18:32:24Z",
  "aliases" : [ "CVE-2021-43853" ],
  "summary" : "AjaxNetProfessional deserializes arbitrary JavaScript objects",
  "details" : "### Overview\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data due to the possibility of deserialization of arbitrary JavaScript objects.\n\n### Description\n\nCross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a web application uses input from a user within the output it generates without validating or encoding it.\n\nXSS effects vary in range from petty nuisance to significant security risk, depending on the sensitivity of the data handled by the vulnerable site and the nature of any security mitigation implemented by the site's owner network.\n\n### Releases\n\nReleases before version 21.12.22.1 are affected. Please be careful to download any binary DLL from other web sites, especially we found NuGet packages not owned by us that contain vulnerable versions.\n\n### Workarounds\n\nA workaround exists that replaces one of the core JavaScript files embedded in the library. Using a XML configuration allows to replace the default JavaScript code to be replaced with the version on GitHub.\n\n```xml\n<configuration>\n\t<configSections>\n\t\t<sectionGroup name=\"ajaxNet\">\n\t\t\t<section name=\"ajaxSettings\" type=\"AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2\" requirePermission=\"false\" restartOnExternalChanges=\"true\"/>\n\t\t</sectionGroup>\n\t</configSections>\n\t<ajaxNet>\n\t\t<ajaxSettings>\n\t\t\t<coreScript>~/ajaxpro-core-fixed.js</coreScript>\n\t\t</ajaxSettings>\n\t</ajaxNet>\n</configuration>\n```\n\nCopy the file core.js from the main project folder to your web server root folder and rename that ajaxpro-core-fixed.js.\n\nClients need to refresh the web page to download the changed JavaScript code.\n\n### References\n\nCommit fixing the issue: c89e39b9679fcb8ab6644fe21cc7e652cb615e2b\n\nNote: the official Ajax.NET Professional (AjaxPro) NuGet package is available here: https://www.nuget.org/packages/AjaxNetProfessional/\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue on this GitHub repository\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "AjaxNetProfessional"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "21.12.22.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional/security/advisories/GHSA-5q7q-qqw2-hjq7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43853"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional/commit/c89e39b9679fcb8ab6644fe21cc7e652cb615e2b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional/releases/tag/v21.12.22.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502", "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-04T21:21:17Z",
    "nvd_published_at" : "2021-12-22T21:15:00Z"
  }
}