
bilities, is often used for evaluation. However, these
vulnerabilities are limited to those occurring within
a single file. In contrast, past instances of DOM-
Based XSS have often spanned multiple files, making
such evaluation insufficient. Furthermore, research on
real-time detection of DOM-Based XSS vulnerabili-
ties must evaluate whether the detection methods are
effective for developers. Yet, no existing research has
conducted user experiments to assess the proposed
methods.
In this study, we explore support mechanisms for
developers to prevent the inclusion of DOM-Based
XSS vulnerabilities in their source code. To this end,
we propose and implement a method for real-time de-
tection of DOM-Based XSS vulnerabilities that span
multiple files during the coding process. To verify
the accuracy of this detection method, we created an
evaluation dataset specifically designed to test these
vulnerabilities, which we have released as an open-
source resource on GitHub. We conducted both ac-
curacy evaluations using the dataset and performance
evaluations to measure detection time. In addition
to evaluating accuracy and performance, we prepared
user experiments to assess the usability of the pro-
posed method from the developers’ perspective. As a
result, we evaluated the effectiveness of our proposed
method in preventing DOM-Based XSS across mul-
tiple metrics and outlined future prospects for its im-
plementation.
2 RELATED WORKS
2.1 DOM Based XSS
To determine the extent to which real web applica-
tions contain DOM Based XSS vulnerabilities, Lekies
et al. surveyed the top 5,000 Alexa(Lekies et al.,
2013). The results showed that 6,167 vulnerabili-
ties were contained within 480 domains. More re-
cently, DOM Based XSS vulnerabilities have also
been found on sites such as Facebook and Tik-
Tok(Vulners.com, 2022; Leyden, 2020).
2.2 Detection Methods
Research aimed at preventing DOM-Based XSS has
been conducted in the past. Generally, program anal-
ysis is divided into two types: dynamic analysis and
static analysis. Similarly, research on DOM-Based
XSS has also followed these two approaches, with dy-
namic and static analysis methods being explored.
In a study conducted by Parameshwaran et al.,
a technique for creating secure patches for websites
in the Alexa Top 1000 was proposed(Parameshwaran
et al., 2015). They put forth a methodology for the
identification of susceptible source code and its sub-
sequent replacement with secure source code through
the dynamic analysis of the code in operation while
the application is executed against a corpus of source
code representing services provided on the web. The
proposed method is dynamic and has a relatively low
overhead, as it can apply patches to vulnerable source
code with an overhead of approximately 5%.
Additionally, studies have been conducted that
do not include vulnerabilities through static analy-
sis. Wang et al. demonstrated the deployment of API
Hardening, a secure API for source code containing
DOM Based XSS vulnerabilities, for two years to de-
velopers within Google(Wang et al., 2021). This re-
sulted in a reduction in the occurrence of DOM Based
XSS vulnerabilities. API Hardening is introduced as
a compile-time checker after the source code is com-
pleted. It prevents vulnerabilities by replacing APIs
that could be Sink with their own secure APIs.
Other studies have been conducted with the objec-
tive of preventing the occurrence of DOM-based XSS.
These include the work of Liu et al. and others, who
have organised, compared and analysed these meth-
ods and pointed out their advantages and disadvan-
tages, including the aforementioned studies(Liu et al.,
2019).
3 VULNERABILITY DETECTION
3.1 DOM Based XSS Occurring via
Multiple Files
In modern development practices, the modular sep-
aration of JavaScript into multiple files has become
common. This approach enhances code reusability
and maintainability while supporting the integration
of external and custom modules. However, managing
interactions across a large number of files introduces
potential risks of vulnerabilities, particularly DOM-
Based XSS, due to insufficient handling of inter-file
dependencies(ars TECHNICA, 2020).
A notable example is CVE-2022-23367, a
DOM-Based XSS vulnerability spanning multiple
files(CVE, 2022a; CVE, 2022b). This case involved
a Source located at location.href and a Sink at loca-
tion.search. The vulnerability arose from inadequate
escaping mechanisms, with the Source and Sink ex-
isting in separate files linked via an import statement.
Addressing these challenges requires a systematic
approach to inter-file vulnerability detection.
ICISSP 2025 - 11th International Conference on Information Systems Security and Privacy
192