CVE-2022-37461: Two Reflected XSS Vulnerabilities in Canon Medical’s Vitrea View
Two reflected cross-site scripting flaws existed in Canon Medical's Vitrea View: one unauthenticated in an error page and one in the administrative panel. An attacker could execute scripts to access patient information, stored images, scans, and credentials for integrated services.
Published on trustwave.com
Change theme to light
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Vitrea View is a Canon Medical product that uses the DICOM standard to view medical images. During a penetration test, Trustwave SpiderLabs researchers Jordan Hedges and Avery Warddhana, previously with Trustwave, identified two vulnerabilities in third-party software for Vitrea View. Both are reflected cross-site scripting issues, and together they were assigned CVE-2022-37461.
The first sits in an error page, reachable without authentication. The second sits in the administrative panel, in the 'Group and Users' page, and requires an authenticated administrator to be lured to a crafted URL. If exploited, an attacker could access patient information and obtain additional access to various services associated with Vitrea View.

Setup
The work was carried out as a penetration test, during which the researchers identified the two vulnerabilities. The report does not describe the test environment, the accounts used, or any tooling beyond the payloads themselves. The first finding is unauthenticated; the second requires an authenticated administrator to be socially engineered into visiting the crafted URL.
Finding it
The researchers found that the error page located at /vitrea-view/error/ reflects all input after the /error/ subdirectory back to the user, with minor restrictions. Single and double quotes, as well as space characters, appear to break the reflection. That is the classic shape of a reflected XSS sink: user-controlled path content lands in the response body, and a naive filter blocks a handful of characters rather than encoding the output.
Separately, in the Vitrea View Administrative panel, the search for groupID, offset, and limit in the 'Group and Users' page reflects input back to the user when text is entered instead of the expected numerical inputs. Here too the reflection is slightly restricted: it does not allow spaces. The parameters are expected to carry numerical inputs, but text entered into them is reflected back to the user.
Exploitation
Step 1: unauthenticated XSS in the error page
Because quotes and spaces break the reflection, the payload avoids both. Backticks and base64 encoding get around the restrictions, and importing remote scripts is possible. The proof of concept below pops up an alert stating "Script Execution" after replacing HOST with the address of the server hosting the Vitrea View application:
hxxps://HOST/vitrea-view/error/Invalid%20session:%20%3Cimg%20src=x%20onerror=alert(atob(%60U2NyaXB0IEV4ZWN1dGlvbg==%60))%3E">
The path after /error/ is reflected into the page. %3Cimg%20src=x%20onerror=...%3E decodes to an img tag with a broken src and an onerror handler, so the handler fires as soon as the browser fails to load the image. The handler calls atob on a base64 string delimited by backticks, %60, instead of quotes: U2NyaXB0IEV4ZWN1dGlvbg== decodes to Script Execution, which is what the alert displays. The trailing "> closes whatever attribute or markup the reflection sits inside. No authentication is needed, so any victim who follows the link runs the attacker's JavaScript in the context of the Vitrea View origin.
Step 2: XSS in the admin panel via group search
In order to access the administrative panel, the attacker would typically attempt to socially engineer an existing administrator into clicking on a specially crafted link. The payload below targets the 'Group and Users' page and injects through the groupId parameter:
hxxps://HOST/vitrea-view/admin/authorization/users/all?_dc=1637817433453&groupId=%3Cimg/src=%271%27/onerror=alert(0)%3E&search=&page=2&offset=0&limit=18
groupId carries %3Cimg/src=%271%27/onerror=alert(0)%3E, which decodes to an img tag whose src is the quoted character 1 and whose onerror calls alert(0). Spaces are avoided by using the forward slash as a separator inside the tag, matching the restriction noted above. Once an authenticated admin is coerced into visiting the affected URL, it is possible to create and modify the Python, JavaScript and Groovy scripts used by the Vitrea View application.
Overall, exploiting the vulnerabilities is an easy endeavor.
Root cause
Both findings are reflected XSS: input supplied in the URL is written back into the HTML response without output encoding. In the error page, everything after /error/ is reflected, and the filter that blocks single quotes, double quotes and spaces is a denylist rather than contextual escaping. Backticks and base64 sidestep it, and the report notes that importing remote scripts is possible, so the restriction does not prevent script execution. In the admin panel, the groupID, offset and limit parameters are expected to be numerical, but text entered into them is reflected back to the user; the only restriction is that spaces are not allowed, which the slash-separated payload avoids. In both cases the reflected input is only slightly restricted, and the restrictions can be bypassed.
Impact
If exploited, these vulnerabilities could be used to retrieve patient information, stored images, or scans, and to modify information depending on the privileges used during the session. Sensitive information and credentials for various services integrated with Vitrea View could be accessed as well. The first finding is unauthenticated. The second requires an authenticated administrator to be socially engineered into visiting the affected URL, after which the attacker can create and modify the Python, JavaScript and Groovy scripts used by the application.
Fix
These vulnerabilities were reported to Canon Medical as part of Trustwave SpiderLabs's Responsible Disclosure process, and Canon Medical released a patch for these issues in version 7.7.6. Trustwave recommends all customers on version 7.x update to the latest release.
Variants to test
- Error and exception pages that echo the requested path. Send a path segment containing an HTML tag and see whether it comes back unencoded; a positive result is the tag appearing verbatim in the response body.
- Character denylists on reflected parameters. If quotes and spaces are blocked, try backticks, base64 via
atob, and/as an attribute separator, as in the payloads above; a positive result is a handler such asonerrorexecuting. - Numeric parameters that accept text. Put a tag into parameters like
groupId,offsetandlimitand check whether the value is reflected; a positive result is the markup rendered rather than rejected or cast to a number. - Admin panel search and listing pages reached by crafted links. Confirm whether an authenticated session is enough for the reflected input to execute, which would let an attacker act with the administrator's privileges.
- Script management features. Where an application lets users create or modify scripts, check whether an XSS in the same origin can reach that functionality, since that turns reflected script execution into persistent control over application logic.
What happened, in plain words
Canon Medical makes a product called Vitrea View. It is a piece of software that doctors and medical staff use to look at medical images, such as scans, in a web browser. It follows a standard called DICOM, which is simply the agreed format that medical imaging equipment uses to store and share images. Think of DICOM as the common language that scanners and viewing software speak so that an image taken on one machine can be opened on another.
Two researchers, Jordan Hedges and Avery Warddhana, were doing a penetration test. A penetration test is a paid, authorised attempt to break into a system, done with the owner's permission, so that the weaknesses can be found and fixed before a real criminal finds them. During that test they found two flaws in third-party software used by Vitrea View. Both flaws belong to a family called reflected cross-site scripting, usually shortened to reflected XSS. Together the two flaws were given the identifier CVE-2022-37461. A CVE is a public catalogue number for a known security flaw, so that everyone in the industry can refer to the same issue by the same name.
To understand reflected XSS, imagine a receptionist who reads back whatever you write on a form. If you write a harmless name, the receptionist reads a harmless name. A website that reflects input does the same thing: it takes text from the address you typed and places it into the page it sends back, without checking whether that text is ordinary words or something the browser will treat as a command. The browser cannot tell the difference between text the site meant to send and text an attacker slipped in, so it runs whatever it is given.
The first flaw is in an error page, and anyone can reach it without logging in. The second is in the administrative panel, the private area where administrators manage the system, and it needs a logged-in administrator to be tricked into opening a crafted link. If either flaw is exploited, an attacker could reach patient information and gain further access to various services connected to Vitrea View.

The setup
The work was carried out as a penetration test, during which the researchers identified the two vulnerabilities. The report does not describe the test environment, the accounts used, or any tooling beyond the payloads themselves. The first flaw is unauthenticated; the second requires an authenticated administrator to be socially engineered into visiting the crafted URL.
A word on the two words that keep coming up. Authentication means proving who you are, usually by logging in with a username and password. Authorisation means what you are allowed to do once you are logged in. The first flaw needs no authentication at all: a stranger can trigger it. The second needs an authenticated administrator, because the vulnerable page only exists behind the login.
Finding it
The researchers found that the error page located at /vitrea-view/error/ reflects all input after the /error/ subdirectory back to the user, with minor restrictions. In plain terms, whatever you put in the address after /error/ is copied into the page that comes back. Single and double quotes, as well as space characters, appear to break the reflection. That is the classic shape of a reflected XSS sink: user-controlled path content lands in the response body, and a naive filter blocks a handful of characters rather than encoding the output.
Two ideas need unpacking here. A sink is the place in the code where untrusted text finally gets used, in this case where it is written into the HTML page. Output encoding is the correct defence: before placing text into a page, the site converts characters that have special meaning in HTML, such as < and >, into harmless lookalikes, so the browser displays them as text instead of treating them as markup. A denylist is the weaker approach the site used instead: it keeps a list of characters it refuses, here quotes and spaces, and hopes that blocking those is enough. Denylists fail whenever there is another way to achieve the same effect, and there usually is.
Separately, in the Vitrea View Administrative panel, the search for groupID, offset, and limit in the 'Group and Users' page reflects input back to the user when text is entered instead of the expected numerical inputs. Here too the reflection is slightly restricted: it does not allow spaces. These parameters are expected to carry numerical inputs, but text entered into them is reflected back to the user. A parameter is simply a named value in a web address, the part after the ? sign, used to tell the page what to show. If a parameter is meant to hold a number, the site should reject anything that is not a number. Here it did not.
Exploitation
Step 1: unauthenticated XSS in the error page
Because quotes and spaces break the reflection, the payload avoids both. A payload is the actual text an attacker sends to trigger the flaw. Backticks and base64 encoding get around the restrictions, and importing remote scripts is possible. Base64 is a way of writing data using only ordinary letters, digits and a couple of symbols, so that it survives being passed around without being mangled. Backticks are the ` character, which in JavaScript can be used in place of quotes to mark a piece of text. The proof of concept below pops up an alert stating "Script Execution" after replacing HOST with the address of the server hosting the Vitrea View application:
hxxps://HOST/vitrea-view/error/Invalid%20session:%20%3Cimg%20src=x%20onerror=alert(atob(%60U2NyaXB0IEV4ZWN1dGlvbg==%60))%3E">
Line by line, in plain words:
hxxps://is the address scheme. It is written withxxinstead ofttso that the link is not clickable in the document and nobody triggers it by accident. In a real attack it would behttps://.HOSTis a placeholder for the address of the server running Vitrea View. The attacker swaps in the real address./vitrea-view/error/is the path to the error page, the page that reflects whatever follows it.Invalid%20session:is the start of the text being reflected.%20is how a space is written in a web address, because addresses cannot contain literal spaces. So this reads asInvalid session:.%3Cimg%20src=x%20onerror=...%3Edecodes to animgtag with a brokensrcand anonerrorhandler.%3Cis<and%3Eis>. Animgtag normally displays a picture;src=xpoints it at a picture that does not exist, so the browser fails to load it.onerroris an instruction that the browser runs when that failure happens, so the handler fires as soon as the browser fails to load the image.- The handler calls
atobon a base64 string delimited by backticks,%60, instead of quotes.atobis a built-in JavaScript function that turns base64 back into ordinary text.%60is the backtick character. U2NyaXB0IEV4ZWN1dGlvbg==is the base64 text. Decoded, it readsScript Execution, which is what the alert displays.- The trailing
">closes whatever attribute or markup the reflection sits inside.
No authentication is needed, so any victim who follows the link runs the attacker's JavaScript in the context of the Vitrea View origin. The origin is the combination of scheme, host and port that the browser uses to decide which site a piece of code belongs to. Code running in the Vitrea View origin is treated by the browser as if it came from Vitrea View itself, which is why it can read and act on the user's session there.
Step 2: XSS in the admin panel via group search
In order to access the administrative panel, the attacker would typically attempt to socially engineer an existing administrator into clicking on a specially crafted link. Social engineering means manipulating a person rather than a machine: sending a plausible-looking message, for example, and hoping the recipient clicks. The payload below targets the 'Group and Users' page and injects through the groupId parameter:
hxxps://HOST/vitrea-view/admin/authorization/users/all?_dc=1637817433453&groupId=%3Cimg/src=%271%27/onerror=alert(0)%3E&search=&page=2&offset=0&limit=18
Line by line:
hxxps://HOSTagain stands for the server, with the scheme written defensively./vitrea-view/admin/authorization/users/allis the address of the 'Group and Users' page inside the admin panel. The wordadminin the path is a hint that this area sits behind a login.?_dc=1637817433453starts the list of parameters.groupId=%3Cimg/src=%271%27/onerror=alert(0)%3Eis the injected part.groupIdcarries%3Cimg/src=%271%27/onerror=alert(0)%3E, which decodes to animgtag whosesrcis the quoted character1and whoseonerrorcallsalert(0).%27is a single quote. The picture again fails to load, and the handler runsalert(0), a simple pop-up used to prove that code executed.- Spaces are avoided by using the forward slash as a separator inside the tag, matching the restriction noted above. Where HTML would normally allow a space between attributes, a
/does the same job here. search=&page=2&offset=0&limit=18are the remaining parameters, the normal query string of the page.searchis empty,pageis 2,offsetis 0 andlimitis 18.
Once an authenticated admin is coerced into visiting the affected URL, it is possible to create and modify the Python, JavaScript and Groovy scripts used by the Vitrea View application. Python, JavaScript and Groovy are programming languages; scripts written in them are small programs the application runs to do its work. Being able to change them means changing what the application does, not just what one page shows.
Overall, exploiting the vulnerabilities is an easy endeavor.
Root cause
Both findings are reflected XSS: input supplied in the URL is written back into the HTML response without output encoding. In the error page, everything after /error/ is reflected, and the filter that blocks single quotes, double quotes and spaces is a denylist rather than contextual escaping. Contextual escaping means encoding text according to exactly where it will land, such as inside an HTML attribute versus between tags, because the dangerous characters differ by position. Backticks and base64 sidestep the denylist, and the report notes that importing remote scripts is possible, so the restriction does not prevent script execution. Importing a remote script means loading a JavaScript file from another server, which lets an attacker run a whole program rather than a single short command.
In the admin panel, the groupID, offset and limit parameters are expected to be numerical, but text entered into them is reflected back to the user; the only restriction is that spaces are not allowed, which the slash-separated payload avoids. In both cases the reflected input is only slightly restricted, and the restrictions can be bypassed.
Impact
If exploited, these vulnerabilities could be used to retrieve patient information, stored images, or scans, and to modify information depending on the privileges used during the session. Privileges are the permissions an account has; a session is the period during which the browser stays logged in, usually tracked by a cookie, which is a small piece of data the site stores in the browser to remember who you are. Sensitive information and credentials for various services integrated with Vitrea View could be accessed as well. Credentials are the usernames, passwords or keys used to log in to those services.
The first finding is unauthenticated. The second requires an authenticated administrator to be socially engineered into visiting the affected URL, after which the attacker can create and modify the Python, JavaScript and Groovy scripts used by the application.
Fix
These vulnerabilities were reported to Canon Medical as part of Trustwave SpiderLabs's Responsible Disclosure process, and Canon Medical released a patch for these issues in version 7.7.6. Responsible disclosure is the practice of telling the vendor privately first and giving them time to fix the problem before details are published. A patch is an update that repairs the flaw. Trustwave recommends all customers on version 7.x update to the latest release.
Variants to test
These are the checks a tester would repeat on other systems, in the same spirit as the two findings above:
- Error and exception pages that echo the requested path. Send a path segment containing an HTML tag and see whether it comes back unencoded; a positive result is the tag appearing verbatim in the response body. The response body is the actual content of the page the server sends back.
- Character denylists on reflected parameters. If quotes and spaces are blocked, try backticks, base64 via
atob, and/as an attribute separator, as in the payloads above; a positive result is a handler such asonerrorexecuting. - Numeric parameters that accept text. Put a tag into parameters like
groupId,offsetandlimitand check whether the value is reflected; a positive result is the markup rendered rather than rejected or cast to a number. - Admin panel search and listing pages reached by crafted links. Confirm whether an authenticated session is enough for the reflected input to execute, which would let an attacker act with the administrator's privileges.
- Script management features. Where an application lets users create or modify scripts, check whether an XSS in the same origin can reach that functionality, since that turns reflected script execution into persistent control over application logic. Persistent here means the effect lasts, because the attacker has changed the scripts the application keeps running.
Glossary
- Authentication: proving who you are, usually by logging in.
- Authorisation: what you are allowed to do once you are logged in.
- Base64: a way of writing data using only ordinary characters so it can be passed around safely.
- Cookie: a small piece of data a site stores in your browser to remember you between requests.
- Credentials: the usernames, passwords or keys used to log in to a service.
- CVE: a public catalogue number for a known security flaw.
- Denylist: a list of things a system refuses, which fails when another route to the same effect exists.
- DICOM: the standard format medical imaging equipment uses to store and share images.
- Handler: an instruction attached to an element, such as
onerror, that runs when an event happens. - HTML attribute: a named setting inside an HTML tag, such as
srcoronerror. - Origin: the combination of scheme, host and port that the browser uses to decide which site code belongs to.
- Output encoding: converting special characters into harmless lookalikes before placing text into a page.
- Parameter: a named value in a web address, after the
?sign. - Patch: an update that repairs a flaw.
- Payload: the text an attacker sends to trigger a flaw.
- Penetration test: an authorised attempt to break into a system so weaknesses can be fixed.
- Privileges: the permissions an account has.
- Reflected XSS: XSS where input from the request is written straight back into the response.
- Responsible disclosure: telling a vendor privately first and giving them time to fix the issue.
- Response body: the actual content of the page the server sends back.
- Session: the period during which your browser stays logged in to a site.
- Sink: the place in code where untrusted text is finally used.
- Social engineering: manipulating a person, rather than a machine, into doing something.
- Vitrea View: a Canon Medical product that uses DICOM to view medical images.