Skip to content

[GHSA-prf8-cf2x-rhx7] fabric-sdk-java has ObjectInputStream.readObject() without ObjectInputFilter, which allows Java deserialization RCE#7570

Merged
advisory-database[bot] merged 1 commit into
brodmart/advisory-improvement-7570from
brodmart-GHSA-prf8-cf2x-rhx7
May 20, 2026
Merged

[GHSA-prf8-cf2x-rhx7] fabric-sdk-java has ObjectInputStream.readObject() without ObjectInputFilter, which allows Java deserialization RCE#7570
advisory-database[bot] merged 1 commit into
brodmart/advisory-improvement-7570from
brodmart-GHSA-prf8-cf2x-rhx7

Conversation

@brodmart
Copy link
Copy Markdown

@brodmart brodmart commented May 1, 2026

Updates

  • Affected products
  • Description

Comments
slight improvement of credits pls thanks : )

@github
Copy link
Copy Markdown
Collaborator

github commented May 1, 2026

Hi there @ryjones! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.

This change will be reviewed by our Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

Copilot AI review requested due to automatic review settings May 1, 2026 15:27
@github-actions github-actions Bot changed the base branch from main to brodmart/advisory-improvement-7570 May 1, 2026 15:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub-reviewed security advisory record for GHSA-prf8-cf2x-rhx7 (CVE-2026-41586), documenting a Java deserialization RCE risk in the deprecated fabric-sdk-java client SDK.

Changes:

  • Introduces a new advisory JSON entry with summary/details, CVSS v4 score, affected Maven coordinates and version range, and references.
  • Documents affected code paths (ObjectInputStream.readObject() without ObjectInputFilter) and recommended remediation (filtering / migration).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
{
"type": "PACKAGE",
"url": "https://github.com/hyperledger/fabric"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this update should happen

"CVE-2026-41586"
],
"summary": "fabric-sdk-java has ObjectInputStream.readObject() without ObjectInputFilter, which allows Java deserialization RCE",
"details": "## Summary\n\nThis advisory covers the deprecated `fabric-sdk-java` client SDK. `Channel.java` implements `readObject()` and exposes `deSerializeChannel()` which call `ObjectInputStream.readObject()` on untrusted byte arrays without configuring an `ObjectInputFilter`. This is the classic Java deserialization RCE pattern.\n\n**Note:** `fabric-sdk-java` is deprecated and maintained in https://github.com/hyperledger/fabric-sdk-java. Filing here as that repo does not have private vulnerability reporting enabled.\n\n## Affected Code\n\n```java\n// src/main/java/org/hyperledger/fabric/sdk/Channel.java\nprivate void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {\n in.defaultReadObject(); // No ObjectInputFilter configured\n}\n\npublic Channel deSerializeChannel(byte[] channelBytes)\n throws IOException, ClassNotFoundException, InvalidArgumentException {\n ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(channelBytes));\n Channel channel = (Channel) ois.readObject(); // Untrusted bytes deserialized\n return channel;\n}\n```\n\n## Attack Vector\n\nAn attacker who can supply crafted serialized Channel bytes to the client application — for example, by compromising a local channel file, injecting data through an application that accepts Channel bytes from external sources, or exploiting a separate write primitive — can achieve RCE via gadget chain exploitation when deSerializeChannel() processes those bytes. The risk is highest in deployments that accept Channel data from sources outside the client's direct control. Note: channel data is not transmitted from Fabric peers; this is a client-side deserialization surface.\n\n## Proof of Concept\n\n```java\n// Generate malicious payload with ysoserial:\n// java -jar ysoserial.jar CommonsCollections6 \"touch /tmp/pwned\" > malicious_channel.ser\n\n// Victim code:\nbyte[] maliciousBytes = Files.readAllBytes(Paths.get(\"malicious_channel.ser\"));\nChannel channel = client.deSerializeChannel(maliciousBytes); // RCE fires here\n```\n\n## Notes on Deprecation\n\nfabric-sdk-java is deprecated as of Hyperledger Fabric v2.5 (replaced by `org.hyperledger.fabric:fabric-gateway`). However, organizations that have not yet migrated remain fully exposed. Automated dependency scanners (Snyk, Dependabot) cannot alert users without a published GHSA. This advisory is filed to ensure those users are notified and directed to migrate.\n\n## Fix\n\nFor the deprecated SDK: add `ObjectInputFilter` to whitelist only expected classes:\n\n```java\nObjectInputFilter filter = ObjectInputFilter.Config.createFilter(\n \"org.hyperledger.fabric.sdk.*;java.util.*;java.lang.*;!*\"\n);\nois.setObjectInputFilter(filter);\n```\n\n**The recommended remediation is migration to `org.hyperledger.fabric:fabric-gateway`**, which does not use Java serialization.\n\n## Resources\n\n- CWE-502: Deserialization of Untrusted Data\n- Migration guide: https://hyperledger.github.io/fabric-gateway/\n\n## Credits\n\nFound by Martin Brodeur (brodmart) via independent security research.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Copy Markdown

@ryjones ryjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@github-actions
Copy link
Copy Markdown

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the Keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot. Please see CONTRIBUTING.md for more policy details.

@github-actions github-actions Bot added the Stale label May 18, 2026
@advisory-database advisory-database Bot merged commit 10a6275 into brodmart/advisory-improvement-7570 May 20, 2026
7 of 8 checks passed
@advisory-database
Copy link
Copy Markdown
Contributor

Hi @brodmart! Thank you so much for contributing to the GitHub Advisory Database. This database is free, open, and accessible to all, and it's people like you who make it great. Thanks for choosing to help others. We hope you send in more contributions in the future!

@advisory-database advisory-database Bot deleted the brodmart-GHSA-prf8-cf2x-rhx7 branch May 20, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants