Vulnerabilities in pkg:golang/github.com/huandu/facebook/v2
PACKAGECVE-2024-35232 is a LOW (CVSS 3.7) github.com/huandu/facebook may expose access_token vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Github.com/huandu/facebook/v2 libraries in the Go ecosystem. The issue involves github.com/huandu/facebook may expose access_token in error message.. Remediation is available by upgrading affected packages to version 2.7.2.
pkg:golang/github.com/huandu/facebook/v2
Vulnerability advisories affecting package pkg:golang/github.com/huandu/facebook/v2. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3f65-m234-9mxr | CVE-2024-35232 | LOW | github.com/huandu/facebook may expose access_token in error message. |
CVE-2024-35232 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-35232
To remediate this vulnerability, upgrade all affected Github.com/huandu/facebook/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/huandu/facebook/v2 to 2.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/huandu/facebook/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-35232, inspect your project dependencies for Github.com/huandu/facebook/v2:
inspect dependencies for github.com/huandu/facebook/v2
Analyze the terminal output to locate any version of Github.com/huandu/facebook/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Github.com/huandu/facebook/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-35232 Affected Github.com/huandu/facebook/v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/huandu/facebook/v2
|
Go |
< 2.7.2
|
2.7.2
|
References
Frequently Asked Questions
What is CVE-2024-35232?
Which Github.com/huandu/facebook/v2 versions are affected?
What version fixes CVE-2024-35232?
Is github.com/huandu/facebook/v2 affected?
What is the CVSS score of CVE-2024-35232?
What CWE is associated with CVE-2024-35232?
How can I check Go dependencies for CVE-2024-35232?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3f65-m234-9mxr",
"modified" : "2024-05-29T20:43:59Z",
"published" : "2024-05-24T20:19:53Z",
"aliases" : [ "CVE-2024-35232" ],
"summary" : "github.com/huandu/facebook may expose access_token in error message.",
"details" : "### Summary\naccess_token can be exposed in error message on fail in HTTP request.\n\n### Details\nUsing this module, when HTTP request fails, error message can contain access_token. This can be happen when:\n- module is sending HTTP request with query parameter `?access_token=...`.\n- and HTTP request fails (errors like `facebook: cannot reach facebook server`).\n\nIn such situation, error message is constucted like following.\nhttps://github.com/huandu/facebook/blob/1591be276561bbdb019c0279f1d33cb18a650e1b/session.go#L558-L567\nOriginal error message contained in it comes from `net/http` module. And it can contain full URL, that can contain query parameter `access_token`:\nhttps://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/http/client.go;l=629-633\nhttps://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/url/url.go;l=30\n\nIt 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.\n\nI'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.\n\n### PoC\nRequest me this section if you need complete instruction.\n\n### Impact\nClient applications with following conditions can be affected.\n- logs error message from this module\n- or returns error message to client as something like HTTP response.\n- or uses error messages somewhere\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/huandu/facebook/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.7.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/huandu/facebook/security/advisories/GHSA-3f65-m234-9mxr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-35232"
}, {
"type" : "WEB",
"url" : "https://github.com/huandu/facebook/commit/8b34431b91b32903c8821b1d7621bf81a029d8e4"
}, {
"type" : "WEB",
"url" : "https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/http/client.go;l=629-633"
}, {
"type" : "WEB",
"url" : "https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/net/url/url.go;l=30"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/huandu/facebook"
}, {
"type" : "WEB",
"url" : "https://github.com/huandu/facebook/blob/1591be276561bbdb019c0279f1d33cb18a650e1b/session.go#L558-L567"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-209" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-24T20:19:53Z",
"nvd_published_at" : "2024-05-24T21:15:59Z"
}
}