BUG: XSSOutputScorer misses SVG and JavaScript data URIs
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Find the XSSOutputScorer implementation and its tests; the issue does not name their paths. Start by tracing the existing data:text/html URI patterns and the reproductions in the issue. Done when SVG and JavaScript data URIs score True in both cases described; linked pull request #3400 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
XSSOutputScorer detects cross-site scripting (XSS) payloads in LLM responses (mapping to OWASP LLM02: Insecure Output Handling). While it detects inline <script>, event handlers, and data:text/html URIs, its data URI patterns are hardcoded exclusively to text/html:
-
SVG Data URIs (
data:image/svg+xml):
SVG markup can execute arbitrary JavaScript via embedded<script>tags or event handlers (onload=alert(1)). When embedded in markdown images (>)), HTML<img src="data:image/svg+xml;base64,...">, or<object data="data:image/svg+xml,...">, these zero-click vectors score asFalse. -
JavaScript Data URIs (
data:text/javascript,data:application/javascript):
Direct script execution via data URIs (e.g.<script src="data:text/javascript,alert(1)">or markdown links[click](data:text/javascript,...)) bypassesdata:text/htmland scores asFalse.
Steps/Code to Reproduce
import asyncio
from pyrit.score import XSSOutputScorer
async def main():
scorer = XSSOutputScorer()
# SVG data URI with onload:
score1 = (await scorer.score_text_async('<img src="data:image/svg+xml;base64,PHN2ZyBvbmxvYWQ9YWxlcnQoMSk+">'))[0]
print("SVG data URI detected:", score1.get_value())
# Script data URI:
score2 = (await scorer.score_text_async('<script src="data:text/javascript,alert(1)"></script>'))[0]
print("Script data URI detected:", score2.get_value())
asyncio.run(main())
Expected Results
Both XSS data URIs should be recognized as executable content and score as True.
Actual Results
Both payloads score as False.
- Ngôn ngữ chính
- Python
- Star
- 4.6k
- Fork
- 962
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 398
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Có thể đã có người làm @aatif101 đã nhận 1 ngày trước. Đang mởBug: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/PyRIT#3343 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: UrlConverter preserves forward slashes by default, preventing path payload evasionCó thể đã có người làm @Kaap10 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: FuzzerGenerator accepts a jailbreak goal below 1 and a success threshold outside [0, 1]Có thể đã có người làm @ShivamSharma43 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: ManyShotJailbreakAttack accepts a negative example_count and drops examples from the endCó thể đã có người làm @ShivamSharma43 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[BLOCKED] FEAT: Drill into paired Scenario outcome conversationsCó thể đã có người làm @shashank03-dev đã nhận 1 ngày trước. Đang mởfeature-request help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
microsoft/PyRIT#3389 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
Uninstall guide omits the CloudWatch log groups AWS CodeBuild creates for useCodeBuild pipelinesĐang mởbug documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
awslabs/visual-asset-management-system#552 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
netbox status: needs triage type: documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
netbox-community/netbox#23460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
awslabs/threat-composer#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ansys/pyansys-common-mcp#213 ·
Maintainer thường phản hồi trong vòng 3 ngày