GHSA-f8c8-4pm7-w885

Suggest an improvement
Source
https://github.com/advisories/GHSA-f8c8-4pm7-w885
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/01/GHSA-f8c8-4pm7-w885/GHSA-f8c8-4pm7-w885.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-f8c8-4pm7-w885
Aliases
Published
2025-01-21T20:25:05Z
Modified
2025-04-08T18:08:27.758720Z
Severity
  • 8.2 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N CVSS Calculator
Summary
Cross-Site Request Forgery in CodeChecker API
Details

Summary

Cross-site request forgery allows an unauthenticated attacker to hijack the authentication of a logged in user, and use the web API with the same permissions.

Details

Security attributes like HttpOnly and SameSite are missing from the session cookie, allowing its use from XHR requests and form submissions. The CodeChecker API endpoints only require the session cookie, they do not require a CSRF token, and missing HTTP headers allow the form submission to succeed (but not XHR). This means that the attacker needs to know the ID of products to edit or delete them, but it does not need knowledge to create new products with the SQLite backend.

PoC

With a superuser logged into CodeChecker.

<html><body>
    <form action="https://codechecker.example.com/v6.58/Products" method="POST" enctype="text/plain">
        <input type="text" name='[1,"getProducts",1,1,{}]' value=''>
    </form>
    <script>document.forms[0].submit()</script>
</body></html>

Or the same form attack on any of the applicable endpoints.

Impact

The vulnerability allows an attacker to make requests to CodeChecker as the currently logged in user, including but not limited to adding, removing or editing products. The attacker needs to know the ID of the available products to modify or delete them. The attacker cannot directly exfiltrate data from CodeChecker, due to being limited to form-based CSRF.

Database specific
{
    "nvd_published_at": "2025-01-21T15:15:13Z",
    "severity": "HIGH",
    "github_reviewed_at": "2025-01-21T20:25:05Z",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-352"
    ]
}
References

Affected packages

PyPI / codechecker

Package

Affected ranges

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

Affected versions

6.*

6.16.0a1
6.16.0
6.17.0
6.18.0
6.18.1
6.18.2
6.19.0
6.19.1
6.20.0rc1
6.20.0
6.21.0rc1
6.21.0
6.22.0rc1
6.22.0
6.22.1
6.22.2
6.22.2.post1
6.23.0rc2
6.23.0
6.23.1
6.24.0
6.24.1
6.24.2
6.24.4