Event log data is not properly sanitized leading to stored Cross-Site Scripting (XSS) vulnerability.
router.get(
"/:id",
isAdmin,
error_catcher(async (req, res) => {
const { id } = req.params;
const ev = await EventLog.findOneWithUser(id);
send_events_page({
[...]
contents: {
type: "card",
contents:
[...]
) +
div(
{ class: "eventpayload" },
ev.payload ? pre(JSON.stringify(ev.payload, null, 2)) : "" //<---
),
},
});
})
The following PoC demonstrates how a non-admin user with permission to read/write on a table can inject malicious javascript code that will be executed in the event log admin panel if event logs are enabled.
To demonstrate this issue, we need to prepare some components. The following steps should be executed with an admin user.
http://localhost:3000/table/newTable name my_table_xss and click CreateAdd field to add a field with Label called payload of type String and click Next >>Attributes and click Next >> - it should redirect to http://localhost:3000/table/<table-number>Edit table properties, set Minimum role to read and Minimum role to write to staffhttp://localhost:3000/viewedit anc click Create ViewView name: my_xss_viewView pattern: EditTable: my_table_xssMinimum role: staffConfigure >>http://localhost:3000/viewedit/config/my_xss_view click Next >> and then Finish >>View my_xss_view savedstaff users can access ithttp://localhost:3000/menuType: ViewView: my_xss_view [Edit]Text label: viewMinimum role: staffAddmy_table_xss table create at step 1http://localhost:3000/eventlog/settingsWhich events should be logged? select:
[X] Insert[X] Insert my_table_xssLogin with a user with staff role (you can do the same steps also with an admin user)
http://localhost:3000/view/my_xss_viewpayload field insert "<svg/onload=alert(`xss`)> and click SaveWith an admin user inspect the log entry generated by the above action:
http://localhost:3000/eventloghttp://localhost:3000/eventlog/<event-number>)Stored Cross-Site Scripting (XSS)
Sanitize the user input before building HTML elements
| Software | From | Fixed in |
|---|---|---|
@saltcorn / server
|
- | 1.0.0-beta.16 |
A security vulnerability is a weakness in software, hardware, or configuration that can be exploited to compromise confidentiality, integrity, or availability. Many vulnerabilities are tracked as CVEs (Common Vulnerabilities and Exposures), which provide a standardized identifier so teams can coordinate patching, mitigation, and risk assessment across tools and vendors.
CVSS (Common Vulnerability Scoring System) estimates technical severity, but it doesn't automatically equal business risk. Prioritize using context like internet exposure, affected asset criticality, known exploitation (proof-of-concept or in-the-wild), and whether compensating controls exist. A "Medium" CVSS on an exposed, production system can be more urgent than a "Critical" on an isolated, non-production host.
A vulnerability is the underlying weakness. An exploit is the method or code used to take advantage of it. A zero-day is a vulnerability that is unknown to the vendor or has no publicly available fix when attackers begin using it. In practice, risk increases sharply when exploitation becomes reliable or widespread.
Recurring findings usually come from incomplete Asset Discovery, inconsistent patch management, inherited images, and configuration drift. In modern environments, you also need to watch the software supply chain: dependencies, containers, build pipelines, and third-party services can reintroduce the same weakness even after you patch a single host. Unknown or unmanaged assets (often called Shadow IT) are a common reason the same issues resurface.
Use a simple, repeatable triage model: focus first on externally exposed assets, high-value systems (identity, VPN, email, production), vulnerabilities with known exploits, and issues that enable remote code execution or privilege escalation. Then enforce patch SLAs and track progress using consistent metrics so remediation is steady, not reactive.
SynScan combines attack surface monitoring and continuous security auditing to keep your inventory current, flag high-impact vulnerabilities early, and help you turn raw findings into a practical remediation plan.