CVE-2022-34169 - Incorrect Conversion between Numeric Types

Severity

98%

Complexity

39%

Confidentiality

98%

The Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets. This can be used to corrupt Java class files generated by the internal XSLTC compiler and execute arbitrary Java bytecode. The Apache Xalan Java project is dormant and in the process of being retired. No future releases of Apache Xalan Java to address this issue are expected. Note: Java runtimes (such as OpenJDK) include repackaged copies of Xalan.

CVSS 3.1 Base Score 9.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

CVSS 3.1 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Demo Examples

Incorrect Conversion between Numeric Types

CWE-681

In the following Java example, a float literal is cast to an integer, thus causing a loss of precision.


               
int i = (int) 33457.8f;

Incorrect Conversion between Numeric Types

CWE-681

This code adds a float and an integer together, casting the result to an integer.


               
$result = (int)$floatVal + $intVal;

Normally, PHP will preserve the precision of this operation, making $result = 4.8345. After the cast to int, it is reasonable to expect PHP to follow rounding convention and set $result = 5. However, the explicit cast to int always rounds DOWN, so the final value of $result is 4. This behavior may have unintended consequences.

Incorrect Conversion between Numeric Types

CWE-681

In this example the variable amount can hold a negative value when it is returned. Because the function is declared to return an unsigned int, amount will be implicitly converted to unsigned.


               
}
return amount;

If the error condition in the code above is met, then the return value of readdata() will be 4,294,967,295 on a system that uses 32-bit integers.

Incorrect Conversion between Numeric Types

CWE-681

In this example, depending on the return value of accecssmainframe(), the variable amount can hold a negative value when it is returned. Because the function is declared to return an unsigned value, amount will be implicitly cast to an unsigned number.


               
}
return amount;

If the return value of accessmainframe() is -1, then the return value of readdata() will be 4,294,967,295 on a system that uses 32-bit integers.

Overview

First reported 2 years ago

2022-07-19 18:15:00

Last updated 2 years ago

2022-11-29 02:07:00

Affected Software

Oracle OpenJDK 8

8

Oracle OpenJDK 8 Update 102

8

Oracle OpenJDK 8 Update 112

8

Oracle OpenJDK 8 Update 152

8

Oracle OpenJDK 8 Update 162

8

Oracle OpenJDK 8 Update 172

8

Oracle OpenJDK 8 Update 192

8

Oracle OpenJDK 8 Update 20

8

Oracle OpenJDK 8 Update 202

8

Oracle OpenJDK 7

7

Oracle OpenJDK 7 Update 241

7

Oracle OpenJDK 7 Update 80

7

Oracle OpenJDK 7 Update 85

7

Oracle OpenJDK 8 Update 212

8

Oracle OpenJDK 8 Update 222

8

Oracle OpenJDK 8 Update 232

8

Oracle OpenJDK 8 Update 40

8

Oracle OpenJDK 8 Update 60

8

Oracle OpenJDK 8 Update 66

8

Oracle OpenJDK 8 Update 72

8

Oracle OpenJDK 8 Update 92

8

Oracle OpenJDK 8 Milestone 1

8

Oracle OpenJDK 8 Milestone 2

8

Oracle OpenJDK 8 Milestone 3

8

Oracle OpenJDK 8 Milestone 4

8

Oracle OpenJDK 8 Milestone 5

8

Oracle OpenJDK 8 Milestone 6

8

Oracle OpenJDK 8 Milestone 7

8

Oracle OpenJDK 8 Milestone 8

8

Oracle OpenJDK 8 Milestone 9

8

Oracle OpenJDK 8 Update 242

8

Oracle OpenJDK 8 Update 252

8

Oracle OpenJDK 8 Update 262

8

Oracle OpenJDK -

NetApp Active IQ Unified Manager for VMware vSphere

vmware_vsphere

NetApp Active IQ Unified Manager for Windows

windows

References

https://lists.apache.org/thread/12pxy4phsry6c34x2ol4fft6xlho4kyw

https://lists.apache.org/thread/2qvl7r43wb4t8p9dd9om1bnkssk07sn8

[oss-security] 20220719 CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

[oss-security] 20220719 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

[oss-security] 20220720 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

[oss-security] 20220719 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

https://www.oracle.com/security-alerts/cpujul2022.html

DSA-5188

DSA-5192

https://lists.apache.org/thread/12pxy4phsry6c34x2ol4fft6xlho4kyw

Issue Tracking, Mailing List, Vendor Advisory

https://lists.apache.org/thread/2qvl7r43wb4t8p9dd9om1bnkssk07sn8

Issue Tracking, Mailing List, Vendor Advisory

[oss-security] 20220719 CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

Mailing List, Third Party Advisory

[oss-security] 20220719 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

Mailing List, Third Party Advisory

[oss-security] 20220720 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

Mailing List, Patch, Third Party Advisory

[oss-security] 20220719 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

Mailing List, Third Party Advisory

https://www.oracle.com/security-alerts/cpujul2022.html

Patch, Third Party Advisory

DSA-5188

Third Party Advisory

DSA-5192

Third Party Advisory

https://security.netapp.com/advisory/ntap-20220729-0009/

FEDORA-2022-19b6f21746

https://security.netapp.com/advisory/ntap-20220729-0009/

Third Party Advisory

FEDORA-2022-19b6f21746

Mailing List, Third Party Advisory

FEDORA-2022-d26586b419

http://packetstormsecurity.com/files/168186/Xalan-J-XSLTC-Integer-Truncation.html

FEDORA-2022-b76ab52e73

FEDORA-2022-ae563934f7

FEDORA-2022-e573851f56

FEDORA-2022-80afe2304a

FEDORA-2022-d26586b419

Mailing List, Third Party Advisory

http://packetstormsecurity.com/files/168186/Xalan-J-XSLTC-Integer-Truncation.html

Third Party Advisory, VDB Entry

FEDORA-2022-b76ab52e73

Mailing List, Third Party Advisory

FEDORA-2022-ae563934f7

Mailing List, Third Party Advisory

FEDORA-2022-e573851f56

Mailing List, Third Party Advisory

FEDORA-2022-80afe2304a

Mailing List, Third Party Advisory

[oss-security] 20221017 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

[debian-lts-announce] 20221018 [SECURITY] [DLA 3155-1] bcel security update

DSA-5256

[oss-security] 20221104 Re: CVE-2022-42920: Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

[oss-security] 20221107 Re: CVE-2022-42920: Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

[oss-security] 20221017 Re: CVE-2022-34169: Apache Xalan Java XSLT library is vulnerable to an integer truncation issue when processing malicious XSLT stylesheets

Mailing List, Patch, Third Party Advisory

[debian-lts-announce] 20221018 [SECURITY] [DLA 3155-1] bcel security update

Mailing List, Third Party Advisory

DSA-5256

Third Party Advisory

[oss-security] 20221104 Re: CVE-2022-42920: Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

Mailing List, Third Party Advisory

[oss-security] 20221107 Re: CVE-2022-42920: Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

Mailing List, Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.