POJIA破甲
地图 / Connector/C++ string escaper re-escapes its own output, enabling SQL injection

Connector/C++ string escaper re-escapes its own output, enabling SQL injection

SQL 注入 / SQL 注入 / #3890289

厂商
MariaDB
严重程度
低危 · CVSS 6.9
赏金
—
弱点
SQL 注入
研究员
@fg0x0
披露日期
2026-11-04
资产
MariaDB Server & Connectors - Data corruption, exfiltration, disclosure
CVE
—

该报告还没有中文解读。

原文摘录

摘自原文(8459 字符中的一小部分)
Utils::escapeString is the escaper behind every identifier and literal that MariaDbDatabaseMetaData interpolates into the information_schema queries it builds. It is implemented on top of sql::mariadb::replace, whose inner loop advances its search cursor by the length of the substitution instead of …
原文中的代码
  SQLString& replaceInternal(SQLString& str, const SQLString& _substr, const SQLString &subst)
  {
    size_t pos= 0, prev= 0;
    ...
    while ((pos= real.find(substr, prev)) != std::string::npos)
    {
      real.replace(pos, substr.length(), realSub);
      prev+= realSub.length();
    }

默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 MariaDB 所有。

时间线

  • 报告提交
  • 公开披露
阅读 HackerOne 原文 ↗作者 @fg0x0 · 版权归作者与 MariaDB 所有

同类报告

SQL Injection Extracts Starbucks Enterprise Accounting, Financial, Payroll DatabaseStarbucks · 2019-08-06SQL injection in https://labs.data.gov/dashboard/datagov/csv_to_json via User-agentGSA Bounty · 2019-03-22Time-Based SQL injection at city-mobil.ruMail.ru · — · $15,000SQL injection at https://sea-web.gold.razer.com/ajax-get-status.php via txid parameterRazer · — · $2,000SQL Injection in https://api-my.pay.razer.com/inviteFriend/getInviteHistoryLogRazer · — · $2,000Blind SQL InjectionInnoGames · — · $2,000