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

使用redis缓存存在的反序列化安全问题 #184

Open
B1eed opened this issue Dec 5, 2020 · 0 comments
Open

使用redis缓存存在的反序列化安全问题 #184

B1eed opened this issue Dec 5, 2020 · 0 comments

Comments

@B1eed
Copy link

B1eed commented Dec 5, 2020

src/main/java/com/jfinal/plugin/redis/serializer/JdkSerializer.java#valueFromBytes中存在readObject调用 发现该方法在
src/main/java/com/jfinal/plugin/redis/Cache.java#get 中调用了 传入的值为根据键名获取redis中存放的字节
如该键存放的是反序列化的bytecode则可导致RCE

	RedisPlugin redis = new RedisPlugin("data","127.0.0.1");
	redis.setSerializer(new JdkSerializer());
	me.add(redis);

Cache dataCache = Redis.use("data");
dataCache.get("bytecodeKey");

redis bytecodeKey 键对应的值为yso生成的恶意字节码即可造成rce

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

1 participant