Description
paicoding 1.0.3 contains a payment bypass vulnerability that allows authenticated attackers to unlock paid articles by guessing weak payment confirmation codes. Attackers can start a payment, enumerate roughly 2000 IdUtil.genPayCode counter values, and submit the matching verifyCode to the unauthenticated callback to mark it paid.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| itwanger | paicoding | 1.0.3 | — |
References
- https://vul.yulun.ac.cn/20261112/paicoding/
- https://github.com/itwanger/paicoding/issues/137
- https://github.com/itwanger/paicoding/blob/903adce70309d340f7eec51ec3c80cfe3c8326c1/paicoding-core/src/main/java/com/github/paicoding/forum/core/util/id/IdUtil.java#L54-L61
- https://github.com/itwanger/paicoding/blob/903adce70309d340f7eec51ec3c80cfe3c8326c1/paicoding-web/src/main/java/com/github/paicoding/forum/web/front/article/rest/ArticlePayRestController.java#L79-L90
- https://www.vulncheck.com/advisories/paicoding-1.0.3-payment-bypass-via-guessable-codes-in-article-api-pay-callback