🔒 [SECURITY] Multiple critical vulnerabilities discovered in StablePay SDK
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
Research direction
Start by reviewing the open pull request #26 and the affected components named in the report: stablepay-sdk/src/widget/TransactionReview.jsx, stablepay-sdk/src/core/Transaction.js, and djed-sdk/src/helpers. js. The issue lists seven security concerns and suggested actions; determine their current status and scope before proposing work. Done means the relevant vulnerabilities are addressed and verified, but the issue does not specify tests or acceptance criteria.
Written by the indexing model from the issue text.
Description
🔒 Security Vulnerabilities Report
During a security audit of the StablePay SDK, I've identified 7 security vulnerabilities that need immediate attention:
Critical Issues (4):
- ❌ No address validation - Funds can be permanently lost if sent to zero address (0x0000... 0000)
- ❌ XSS vulnerabilities - User input is not sanitized, allowing cross-site scripting attacks
- ❌ Hardcoded UI fee address - No flexibility for deployment configuration
- ❌ Fixed gas limit - Hardcoded to 500,000, causing transaction failures during network congestion
Medium Issues (2):
- ⚠️ No rate limiting - System vulnerable to DoS attacks via transaction spam
- ⚠️ No amount validation - Allows negative amounts, overflow attacks, NaN/Infinity values
Low Issues (1):
- ⚠️ Missing security audit logging - Security events are not being tracked
📊 Risk Assessment
- CVSS Scores: Critical vulnerabilities range from 7.5 to 9.1
- Impact: Potential fund loss, account compromise, service disruption
- Likelihood: High for user-facing vulnerabilities
🎯 Affected Components
stablepay-sdk/src/widget/TransactionReview.jsxstablepay-sdk/src/core/Transaction.jsdjed-sdk/src/helpers. js- Multiple components accepting user input
📋 Recommended Actions
- Implement input validation for addresses (format, zero address, blacklists)
- Add XSS sanitization for all user inputs
- Make UI address configurable via environment variables
- Implement dynamic gas estimation with safety buffer
- Add rate limiting to prevent DoS attacks
- Validate transaction amounts
- Add security event logging
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/StablePay
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
StabilityNexus/StablePay#64 · 1 comment ·
-
[BUG]: Missing SDK API documentation and incomplete developer-facing usage guide in StablePay READMEOpenbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StabilityNexus/StablePay#104 · 1 comment ·
-
[BUG]: `stablepay-sdk` README documents an unrelated thirdweb app instead of the actual SDK APIOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
StabilityNexus/StablePay#102 ·
-
[FEATURE]: Centralize transaction initialization and quote fetching to avoid duplicate RPC calls in the widgetMay be free again @CaptainLevi2k04 claimed this 81 days ago, and no pull request is open. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
StabilityNexus/StablePay#101 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
StabilityNexus/StablePay#96 · 1 comment ·
All issues in StabilityNexus/StablePay
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day