BUG: UrlConverter preserves forward slashes by default, preventing path payload evasion
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start by locating UrlConverter and its tests, then check how it calls urllib.parse.quote and how converter options are exposed. The issue includes a reproducer and expected output: forward slashes should encode as %2F by default, while callers can configure safe. An open pull request is already linked, so check its status before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
UrlConverter encodes text prompts to URL-encoded representations for red teaming and evasion testing. Currently, it delegates directly to urllib.parse.quote(prompt) without constructor configuration.
Because Python's standard library urllib.parse.quote(string, safe='/') defaults to safe='/':
- Path traversal payloads (
../../etc/passwd) encode to../../etc/passwdwith all path slashes preserved literally. - SSRF and open redirect payloads (
https://attacker.com/steal) encode tohttps%3A//attacker.com/steal, preserving all slashes.
In adversarial evaluations and WAF evasion testing, red-teamers specifically encode forward slashes as %2F to bypass path normalization and WAF rules. Because UrlConverter exposes no parameters and hardcodes the stdlib default, callers cannot produce %2F without an explicit safe configuration parameter.
Steps/Code to Reproduce
import asyncio
from pyrit.converter import UrlConverter
async def main():
converter = UrlConverter()
result = await converter.convert_async(prompt="../../etc/passwd")
print("Encoded payload:", result.output_text)
print("Contains literal slash:", "/" in result.output_text)
asyncio.run(main())
Expected Results
Path traversal payloads should have forward slashes encoded as %2F by default (..%2F..%2Fetc%2Fpasswd), and callers should be able to configure safe characters if they wish to preserve specific characters (e.g. UrlConverter(safe="/")).
Actual Results
Encoded payload: ../../etc/passwd
Contains literal slash: True
- Lenguaje dominante
- Python
- Estrellas
- 4.6k
- Forks
- 962
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 398
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG: MarkdownInjectionScorer misses shortcut-reference images with path-based exfiltration, and raw HTML <img>Posiblemente ocupada @aatif101 la tomó hace 1 día. AbiertoBug: triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/PyRIT#3343 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
BUG: XSSOutputScorer misses SVG and JavaScript data URIsPosiblemente ocupada @Kaap10 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
BUG: FuzzerGenerator accepts a jailbreak goal below 1 and a success threshold outside [0, 1]Posiblemente ocupada @ShivamSharma43 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
BUG: ManyShotJailbreakAttack accepts a negative example_count and drops examples from the endPosiblemente ocupada @ShivamSharma43 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
[BLOCKED] FEAT: Drill into paired Scenario outcome conversationsPosiblemente ocupada @shashank03-dev la tomó hace 1 día. Abiertofeature-request help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
microsoft/PyRIT#3389 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/PyRIT
Issues similares
-
[Bug] Unit tests reach real Bedrock call paths without patching the modelPosiblemente ocupada @proton0210 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
aws-samples/sample-aws-genai-db-modernizer#1318 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
pyarrow-25.0.1-cp310-cp310-manylinux_2_28_x86_64.whl: 1 vulnerabilities (highest severity is: 5.3)AbiertoMend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
capitalone/locopy#394 ·
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextAbiertobug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ietf-tools/datatracker#11922 · 1 comentario ·
Los mantenedores suelen responder en 1 día