Business Logic Bypass
Description
Client-controlled financial values flow to payment operations without server-side calculation.
What Shoulder detects
How to fix
Fetch prices from the database instead of trusting client values.
```go
func checkout(c *gin.Context) {
productID := c.PostForm("product_id")
var product Product
db.First(&product, productID)
total := product.Price * float64(quantity)
processPayment(total)
}
```
Learn more: https://shoulder.dev/learn/go/cwe-840/business-logic-bypass
Applies to
Languages
Frameworks
gin
echo
fiber
chi
gorilla
net/http
References
Scan for this issue
Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=go-business-logic-bypass .