GHSA-w8rc-pgxq-x2cj

Suggest an improvement
Source
https://github.com/advisories/GHSA-w8rc-pgxq-x2cj
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/04/GHSA-w8rc-pgxq-x2cj/GHSA-w8rc-pgxq-x2cj.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-w8rc-pgxq-x2cj
Aliases
Published
2020-04-22T20:59:26Z
Modified
2023-11-01T04:51:29.238202Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
Negative charge in shopping cart in Shopizer
Details

Impact

Using API or Controller based versions negative quantity is not adequately validated hence creating incorrect shopping cart and order total.

Patches

Adding a back-end verification to check that quantity parameter isn't negative. If so, it is set to 1. Patched in 2.11.0

Workarounds

Without uprading, it's possible to just apply the fixes in the same files it's done for the patch. Or you use javax constraint validation on the quantity parameter.

References

Input Validation Using bean validation constraint Commits with fixes CVE Details below : Mitre NVD

Credits

Found and solved by Yannick Gosset from Aix-Marseille University cybersecurity master program supervised by Yassine Ilmi

Database specific
{
    "nvd_published_at": null,
    "github_reviewed_at": "2020-04-16T18:16:42Z",
    "severity": "CRITICAL",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-20"
    ]
}
References

Affected packages

Maven / com.shopizer:sm-core-model

Package

Name
com.shopizer:sm-core-model
View open source insights on deps.dev
Purl
pkg:maven/com.shopizer/sm-core-model

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.11.0

Affected versions

2.*

2.0.2
2.0.3
2.2.0
2.2.0.1
2.2.1
2.3.0.0
2.4.0
2.5.0
2.6.0
2.7.0
2.8.0
2.9.0
2.10.0