CVE-2021-43853 (published 2021-12-22T21:15Z)

Ajax.NET Professional (AjaxPro) is an AJAX framework available for Microsoft ASP.NET. Affected versions of this package are vulnerable to JavaScript object injection which may result in cross site scripting when leveraged by a malicious user. The affected core relates to JavaScript object creation when parsing json input. Releases before version 21.12.22.1 are affected. A workaround exists that replaces one of the core JavaScript files embedded in the library. See the GHSA-5q7q-qqw2-hjq7 for workaround details.

Severity: LOW
CVSS v2 base score: 3.5 (AV:N/AC:M/Au:S/C:N/I:P/A:N)
CVSS v3 base score: 5.4, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)

Weakness information:
cwe_id: CWE-502
cwe_name: Deserialization of Untrusted Data
description: The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
extended_description: 
            It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
            Data that is untrusted can not be trusted to be well-formed.
            When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
         
         

Fix information:
repo_url: https://github.com/michaelschwarz/Ajax.NET-Professional
commit_details: repo_url: https://github.com/michaelschwarz/Ajax.NET-Professional
author: Michael Schwarz
author_date: 2021-12-22 09:24:12+01:00
msg: fixed another XSS issue
repository: repo_url: https://github.com/michaelschwarz/Ajax.NET-Professional
repo_name: michaelschwarz/Ajax.NET-Professional
description: Ajax.NET Professional (AjaxPro) is one of the first AJAX frameworks available for Microsoft ASP.NET and is working with many .NET frameworks starting with v1.1.
repo_language: C#
owner: michaelschwarz
file_changes: filename: Constant.cs
change_type: ModificationType.MODIFY
diff: @@ -52,6 +52,6 @@ namespace AjaxPro
         /// <summary>
 		/// The assembly version.
 		/// </summary>
-        public const string AssemblyVersion = "21.12.21.2";
+        public const string AssemblyVersion = "21.12.22.1";
 	}
 }

programming_language: C#
filename: core.js
change_type: ModificationType.MODIFY
diff: @@ -179,7 +179,7 @@ Object.extend(AjaxPro, {
 			var d = date.match(/Date\((.*?)\)/)[1];
 			return "new Date(" + parseInt(d) + ")";
 		}
-		else { // ISO Date 2007-12-31T23:59:59Z                                     
+		/*else { // ISO Date 2007-12-31T23:59:59Z
 			var matches = date.split(/[-,:,T,Z]/);
 			if (matches.length == 7) {
 				matches[1] = (parseInt(matches[1], 0) - 1).toString();
@@ -194,21 +194,17 @@ Object.extend(AjaxPro, {
 						s += ",";
                     }
 					s += parseInt(matches[i], 10);
+					console.log(s);
 				}
 				if (isDate) {
 					return "new Date(Date.UTC(" + s + "))";
 				}
 			}
-		}
+		}*/
 		return str;
 	},
 	parse: function (text) {
-		// not yet possible as we still return new type() JSON
-		//		if (!(!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
-		//		text.replace(/"(\\.|[^"\\])*"/g, '')))  ))
-		//			throw new Error("Invalid characters in JSON parse string.");                 
-		var regEx = /(\"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}.*?\")|(\"\\\/Date\(.*?\)\\\/")/g;
-		text = text.replace(regEx, this.regExDate);
+		text = text.replace(/(\"\\\/Date\(\d+\)\\\/")/g, this.regExDate);
 		return eval('(' + text + ')');
 	},
 	m: {

programming_language: JavaScript