CVE-2018-12104
Description
Cross-site scripting (XSS) vulnerability in Airbnb Knowledge Repo 0.7.4 allows remote attackers to inject arbitrary web scripts or HTML via the post comments functionality, as demonstrated by the post/posts/new_report.kp URI.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Airbnb Knowledge Repo 0.7.4 is vulnerable to stored XSS via post comments, allowing unauthenticated attackers to execute arbitrary JavaScript in victims' browsers.
Vulnerability
Airbnb Knowledge Repo version 0.7.4 contains a stored cross-site scripting (XSS) vulnerability in the post comments functionality [1][4]. An attacker can inject arbitrary JavaScript or HTML into the comment field, which is then rendered without proper sanitization when the post is viewed. The vulnerable endpoint is /post/posts/new_report.kp [1]. The issue is caused by insufficient output encoding of user-supplied input in the comment submission and display pipeline.
Exploitation
An attacker does not need authentication; the post comments feature is accessible to unauthenticated users on public posts [4]. The attack requires only that a victim views the post containing the malicious comment. The attacker submits a comment containing a payload such as `` [4]. When any user (including an authenticated user or administrator) views the post, the payload executes in their browser context.
Impact
Successful exploitation allows arbitrary JavaScript execution in the context of the victim's session on the Knowledge Repo instance [4]. The attacker can perform a wide range of client-side attacks, including session hijacking, defacement, phishing, redirection to malicious sites, or browser-based cryptomining [4]. The attacker does not gain server-side access, but can compromise the integrity and confidentiality of the victim's interactions with the application.
Mitigation
As of the available references, no patched version has been released that addresses this vulnerability [3][4]. The project maintainers were notified via a GitHub issue [4]. Users should apply general web application security best practices, such as implementing context-sensitive output encoding and input validation, as recommended by the OWASP XSS Prevention Cheat Sheet [4]. If not already done, consider disabling anonymous comments or using a web application firewall (WAF) to filter malicious inputs until a fix is available.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
knowledge-repoPyPI | < 0.9.0 | 0.9.0 |
Affected products
2- Range: <=0.7.4
Patches
1f026ad2afea1Fix XSS vulnerability by escaping comments
1 file changed · +2 −3
knowledge_repo/app/routes/comment.py+2 −3 modified@@ -6,7 +6,7 @@ - /delete_comment """ import logging -from flask import request, Blueprint, g +from flask import request, Blueprint, g, escape from .. import permissions from ..proxies import db_session, current_user @@ -43,8 +43,7 @@ def post_comment(): .first()) else: comment = Comment(post_id=post.id) - - comment.text = data['text'] + comment.text = escape(data['text']) comment.user_id = current_user.id db_session.add(comment) db_session.commit()
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
10- github.com/advisories/GHSA-xmw7-848p-p95wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2018-12104ghsaADVISORY
- www.securityfocus.com/bid/104487mitrevdb-entryx_refsource_BID
- github.com/airbnb/knowledge-repo/commit/f026ad2afea14e0ffc91f1aa0eaedcdc72c63167ghsaWEB
- github.com/airbnb/knowledge-repo/issues/254ghsaWEB
- github.com/airbnb/knowledge-repo/issues/431ghsax_refsource_MISCWEB
- github.com/airbnb/knowledge-repo/pull/558ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/knowledge-repo/PYSEC-2018-116.yamlghsaWEB
- pypi.org/project/knowledge-repoghsaWEB
- web.archive.org/web/20200227121013/http://www.securityfocus.com/bid/104487ghsaWEB
News mentions
0No linked articles in our index yet.