binance / binance/binance-connector-java

[Security] API Secret Stored as Immutable String in Java

Open
#226 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
581
Forks
255
Avg merge
2m
Merged PRs (30d)
2

Description

## Bug Name
API Secret Stored as Immutable String in Java

## Attack Scenario
Java String objects are immutable and cannot be zeroed from memory. The API secret remains in the JVM heap until garbage collection and may appear in heap dumps.

## Impact
Low. Requires heap dump access. Relevant for compliance-sensitive environments.

## Components
File: clients/common/src/main/java/com/binance/connector/client/common/sign/HmacSignatureGenerator.java line 10. private final String apiSecret.

## Reproduction
1. Take a heap dump of a running Java application using the connector.
2. Search for API secret string in the heap dump.
3. Secret is present and readable.

## Fix
Use char[] or byte[] that can be explicitly zeroed after use, following Java security best practices.

## Details
Finding ID: LOW-02
Severity: Low

---
Researcher: Independent Security Researcher -- Mefai Security Team

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.