MEDIUM: No input validation on subscription amount — negative and NaN values accepted #9
Labels
No labels
blocked:needs-human
blocked:verify-failed
bug
feature-request
quickfix
security/high
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/subvault#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
Location
backend/src/controllers/SubscriptionController.tslines 69–83Description
The
createmethod only checks ifamount === undefined, allowing negative numbers, NaN, Infinity, and extremely large values:Number(amount)will silently convert strings like''to 0, andNumber(undefined)to NaN. There is no check thatamountis a positive finite number.Impact
Suggested Fix
Add proper validation: