CVE-2021-23758: AjaxNetProfessional Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-6r7c-6w96-8pvw
CVSS 9.8
CWE-502
Published
Advisory Summary

CVE-2021-23758 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting AjaxNetProfessional libraries in the NuGet ecosystem. The issue involves remote code execution in ajaxnetprofessional. Remediation is available by upgrading affected packages to version 21.11.29.1.

CVE-2021-23758 at a Glance

CVE Identifier CVE-2021-23758
GHSA Identifier GHSA-6r7c-6w96-8pvw
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product AjaxNetProfessional
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2021-23758

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.11.29.1
Upgrade AjaxNetProfessional to 21.11.29.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-23758, 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.11.29.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 .NET classes, which can be abused to gain remote code execution. ### Description Serialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc. Deserialization of untrusted data (CWE-502), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution. Java deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a popular library (Apache Commons Collection). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products. An attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed. Developers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application an attacker can execute functions (including calling Runtime.exec() to execute local OS commands). ### Releases Releases before version 21.11.29.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 There is no workaround available that addresses all issues except updating to latest version from GitHub. ### References Find original CVE posting here: https://security.snyk.io/vuln/SNYK-DOTNET-AJAXPRO2-1925971 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-23758 Affected AjaxNetProfessional Versions

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

References

Frequently Asked Questions

What is CVE-2021-23758?
CVE-2021-23758 is a security vulnerability in AjaxNetProfessional involving Remote Code Execution in AjaxNetProfessional under CWE-502: Deserialization of Untrusted Data.
Which AjaxNetProfessional versions are affected?
Affected versions include releases prior to 21.11.29.1 across affected packages: AjaxNetProfessional.
What version fixes CVE-2021-23758?
Upgrading to 21.11.29.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.11.29.1. Upgrade your dependency to 21.11.29.1 or later.
What is the CVSS score of CVE-2021-23758?
CVE-2021-23758 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-23758?
CVE-2021-23758 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-23758?
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-6r7c-6w96-8pvw",
  "modified" : "2026-02-03T17:39:24Z",
  "published" : "2021-12-07T21:21:49Z",
  "aliases" : [ "CVE-2021-23758" ],
  "summary" : "Remote Code Execution in AjaxNetProfessional",
  "details" : "### Overview\n\nAffected versions of this package are vulnerable to Deserialization of Untrusted Data due to the possibility of deserialization of arbitrary .NET classes, which can be abused to gain remote code execution.\n\n### Description\n\nSerialization is a process of converting an object into a sequence of bytes which can be persisted to a disk or database or can be sent through streams. The reverse process of creating object from sequence of bytes is called deserialization. Serialization is commonly used for communication (sharing objects between multiple hosts) and persistence (store the object state in a file or a database). It is an integral part of popular protocols like Remote Method Invocation (RMI), Java Management Extension (JMX), Java Messaging System (JMS), Action Message Format (AMF), Java Server Faces (JSF) ViewState, etc.\n\nDeserialization of untrusted data (CWE-502), is when the application deserializes untrusted data without sufficiently verifying that the resulting data will be valid, letting the attacker to control the state or the flow of the execution.\n\nJava deserialization issues have been known for years. However, interest in the issue intensified greatly in 2015, when classes that could be abused to achieve remote code execution were found in a popular library (Apache Commons Collection). These classes were used in zero-days affecting IBM WebSphere, Oracle WebLogic and many other products.\n\nAn attacker just needs to identify a piece of software that has both a vulnerable class on its path, and performs deserialization on untrusted data. Then all they need to do is send the payload into the deserializer, getting the command executed.\n\nDevelopers put too much trust in Java Object Serialization. Some even de-serialize objects pre-authentication. When deserializing an Object in Java you typically cast it to an expected type, and therefore Java's strict type system will ensure you only get valid object trees. Unfortunately, by the time the type checking happens, platform code has already created and executed significant logic. So, before the final type is checked a lot of code is executed from the readObject() methods of various objects, all of which is out of the developer's control. By combining the readObject() methods of various classes which are available on the classpath of the vulnerable application an attacker can execute functions (including calling Runtime.exec() to execute local OS commands).\n\n### Releases\n\nReleases before version 21.11.29.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\nThere is no workaround available that addresses all issues except updating to latest version from GitHub.\n\n### References\n\nFind original CVE posting here: https://security.snyk.io/vuln/SNYK-DOTNET-AJAXPRO2-1925971\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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "AjaxNetProfessional"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "21.11.29.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 21.11.29"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional/security/advisories/GHSA-6r7c-6w96-8pvw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23758"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional/commit/b0e63be5f0bb20dfce507cb8a1a9568f6e73de57"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/michaelschwarz/Ajax.NET-Professional"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-DOTNET-AJAXPRO2-1925971"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/175677/AjaxPro-Deserialization-Remote-Code-Execution.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-12-06T21:20:20Z",
    "nvd_published_at" : null
  }
}