Summary
github.com/huandu/facebook may expose access_token in error message.
access_token can be exposed in error message on fail in HTTP request.
Details
Using this module, when HTTP request fails, error message can contain access_token. This can be happen when:
- module is sending HTTP request with query parameter
?access_token=.... - and HTTP request fails (errors like
facebook: cannot reach facebook server).
In such situation, error message is constucted like following.
https://github.com/huandu/facebook/blob/1591be276561bbdb019c0279f1d33cb18a650e1b/session.go#L558-L567
Original error message contained in it comes from net/http module. And it can contain full URL, that can contain query parameter access_token:
https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/http/client.go;l=629-633
https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/url/url.go;l=30
It should be very common that applications log error message when they encounter errors. As a result, access_token can be stored into log server and some other infrastructures. Of course other careless error handling in client code that causing other security problems can exist.
I'm not very sure that whether we can consider that github.com/huandu/facebook is vulnerable. Anyway, I think current error message, that can expose access_token, is not desirble.
PoC
Request me this section if you need complete instruction.
Impact
Client applications with following conditions can be affected.
- logs error message from this module
- or returns error message to client as something like HTTP response.
- or uses error messages somewhere
CVE-2024-35232 has a CVSS score of 3.7 (Low). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.7.2); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2024-35232? CVE-2024-35232 is a low-severity security vulnerability in github.com/huandu/facebook/v2 (go), affecting versions <= 2.7.1. It is fixed in 2.7.2.
- How severe is CVE-2024-35232? CVE-2024-35232 has a CVSS score of 3.7 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/huandu/facebook/v2 are affected by CVE-2024-35232? github.com/huandu/facebook/v2 (go) versions <= 2.7.1 is affected.
- Is there a fix for CVE-2024-35232? Yes. CVE-2024-35232 is fixed in 2.7.2. Upgrade to this version or later.
- Is CVE-2024-35232 exploitable, and should I be worried? Whether CVE-2024-35232 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2024-35232 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2024-35232? Upgrade
github.com/huandu/facebook/v2to 2.7.2 or later.