CVE-2022-46151: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pinterest querybook
Querybook is an open source data querying UI. In affected versions user provided data is not escaped in the error field of the auth callback url in `querybook/server/app/auth/oauth_auth.py` and `querybook/server/app/auth/okta_auth.py`. This may allow attackers to perform reflected cross site scripting (XSS) if Content Security Policy (CSP) is not enabled or `unsafe-inline` is allowed. Users are advised to upgrade to the latest, patched version of querybook (version 3.14.2 or greater). Users unable to upgrade may enable CSP and not allow unsafe-inline or manually escape query parameters in a reverse proxy.
AI Analysis
Technical Summary
CVE-2022-46151 is a reflected Cross-Site Scripting (XSS) vulnerability identified in Pinterest's open source data querying UI, Querybook, specifically in versions prior to 3.14.2. The vulnerability arises from improper neutralization of user input in the error field of the authentication callback URL, as implemented in the OAuth and Okta authentication modules (querybook/server/app/auth/oauth_auth.py and querybook/server/app/auth/okta_auth.py). When user-supplied data is not properly escaped or sanitized before being embedded into web pages, it allows attackers to inject malicious scripts that execute in the context of the victim's browser. This reflected XSS attack vector requires that the victim interacts with a crafted URL containing malicious payloads. The exploitability is contingent on the absence or misconfiguration of Content Security Policy (CSP) headers; specifically, if CSP is not enabled or if the policy permits 'unsafe-inline' scripts, the attack can succeed. The vulnerability does not require authentication, increasing its risk profile, and can lead to session hijacking, credential theft, or unauthorized actions performed on behalf of the user. The vendor has addressed this issue in Querybook version 3.14.2 and later. For users unable to upgrade, mitigation includes enforcing strict CSP headers disallowing 'unsafe-inline' scripts or manually escaping query parameters via reverse proxy configurations. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations utilizing Querybook versions prior to 3.14.2, this vulnerability poses a significant risk to confidentiality and integrity of user sessions and data. As Querybook is used for data querying and analysis, exploitation could allow attackers to execute arbitrary scripts in users' browsers, potentially leading to theft of sensitive query results, credentials, or session tokens. This could compromise internal data analytics workflows and expose sensitive business intelligence. The reflected nature of the XSS means attackers must lure users to malicious URLs, which could be facilitated through phishing campaigns. The absence of authentication requirements broadens the attack surface, enabling external attackers to target employees or partners. If exploited, this could also lead to reputational damage and regulatory compliance issues under GDPR, especially if personal data is exposed or manipulated. The impact on availability is limited but could include disruption of user sessions or denial of service through script-based attacks. Overall, the vulnerability undermines trust in the affected web application components and could serve as a foothold for further attacks within European enterprise environments.
Mitigation Recommendations
1. Immediate upgrade to Querybook version 3.14.2 or later is strongly recommended to apply the official patch addressing this vulnerability. 2. For environments where upgrading is not immediately feasible, implement strict Content Security Policy (CSP) headers that explicitly disallow 'unsafe-inline' scripts and restrict script sources to trusted domains. 3. Employ reverse proxy solutions to sanitize and escape query parameters in the authentication callback URLs, ensuring no malicious scripts can be injected. 4. Conduct regular security audits and penetration testing focusing on web application input validation and output encoding, particularly in authentication flows. 5. Educate users and administrators about phishing risks associated with malicious URLs exploiting reflected XSS. 6. Monitor web server and application logs for unusual URL patterns or error callback requests that may indicate attempted exploitation. 7. Integrate Web Application Firewalls (WAFs) with custom rules to detect and block reflected XSS payloads targeting Querybook endpoints. 8. Review and tighten OAuth and Okta authentication configurations to minimize exposure of sensitive parameters in URLs.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Italy, Spain
CVE-2022-46151: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pinterest querybook
Description
Querybook is an open source data querying UI. In affected versions user provided data is not escaped in the error field of the auth callback url in `querybook/server/app/auth/oauth_auth.py` and `querybook/server/app/auth/okta_auth.py`. This may allow attackers to perform reflected cross site scripting (XSS) if Content Security Policy (CSP) is not enabled or `unsafe-inline` is allowed. Users are advised to upgrade to the latest, patched version of querybook (version 3.14.2 or greater). Users unable to upgrade may enable CSP and not allow unsafe-inline or manually escape query parameters in a reverse proxy.
AI-Powered Analysis
Technical Analysis
CVE-2022-46151 is a reflected Cross-Site Scripting (XSS) vulnerability identified in Pinterest's open source data querying UI, Querybook, specifically in versions prior to 3.14.2. The vulnerability arises from improper neutralization of user input in the error field of the authentication callback URL, as implemented in the OAuth and Okta authentication modules (querybook/server/app/auth/oauth_auth.py and querybook/server/app/auth/okta_auth.py). When user-supplied data is not properly escaped or sanitized before being embedded into web pages, it allows attackers to inject malicious scripts that execute in the context of the victim's browser. This reflected XSS attack vector requires that the victim interacts with a crafted URL containing malicious payloads. The exploitability is contingent on the absence or misconfiguration of Content Security Policy (CSP) headers; specifically, if CSP is not enabled or if the policy permits 'unsafe-inline' scripts, the attack can succeed. The vulnerability does not require authentication, increasing its risk profile, and can lead to session hijacking, credential theft, or unauthorized actions performed on behalf of the user. The vendor has addressed this issue in Querybook version 3.14.2 and later. For users unable to upgrade, mitigation includes enforcing strict CSP headers disallowing 'unsafe-inline' scripts or manually escaping query parameters via reverse proxy configurations. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations utilizing Querybook versions prior to 3.14.2, this vulnerability poses a significant risk to confidentiality and integrity of user sessions and data. As Querybook is used for data querying and analysis, exploitation could allow attackers to execute arbitrary scripts in users' browsers, potentially leading to theft of sensitive query results, credentials, or session tokens. This could compromise internal data analytics workflows and expose sensitive business intelligence. The reflected nature of the XSS means attackers must lure users to malicious URLs, which could be facilitated through phishing campaigns. The absence of authentication requirements broadens the attack surface, enabling external attackers to target employees or partners. If exploited, this could also lead to reputational damage and regulatory compliance issues under GDPR, especially if personal data is exposed or manipulated. The impact on availability is limited but could include disruption of user sessions or denial of service through script-based attacks. Overall, the vulnerability undermines trust in the affected web application components and could serve as a foothold for further attacks within European enterprise environments.
Mitigation Recommendations
1. Immediate upgrade to Querybook version 3.14.2 or later is strongly recommended to apply the official patch addressing this vulnerability. 2. For environments where upgrading is not immediately feasible, implement strict Content Security Policy (CSP) headers that explicitly disallow 'unsafe-inline' scripts and restrict script sources to trusted domains. 3. Employ reverse proxy solutions to sanitize and escape query parameters in the authentication callback URLs, ensuring no malicious scripts can be injected. 4. Conduct regular security audits and penetration testing focusing on web application input validation and output encoding, particularly in authentication flows. 5. Educate users and administrators about phishing risks associated with malicious URLs exploiting reflected XSS. 6. Monitor web server and application logs for unusual URL patterns or error callback requests that may indicate attempted exploitation. 7. Integrate Web Application Firewalls (WAFs) with custom rules to detect and block reflected XSS payloads targeting Querybook endpoints. 8. Review and tighten OAuth and Okta authentication configurations to minimize exposure of sensitive parameters in URLs.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-11-28T17:27:19.996Z
- Cisa Enriched
- true
Threat ID: 682d9846c4522896dcbf4ec4
Added to database: 5/21/2025, 9:09:26 AM
Last enriched: 6/22/2025, 11:21:30 AM
Last updated: 7/31/2025, 4:18:01 PM
Views: 12
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.