Authentication Bypass in GitHub Webhook Verification via Missing X-Hub-Signature-256 Header
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, node.js
- Área
- authentication, backend, security
Línea de trabajo
Empieza leyendo templates/node/github-issue-bot/src/github.js y ejecuta la reproducción proporcionada node poc.js para confirmar el comportamiento cuando falta el header. Se considera terminado cuando las solicitudes sin X-Hub-Signature-256 son rechazadas y las solicitudes solo se aceptan después de la verificación criptográfica con el secreto de webhook configurado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Reproduction steps
Reproduction steps*
Clone the Appwrite templates repository:
git clone https://github.com/appwrite/templates.git
Navigate to the vulnerable template:
cd templates/node/github-issue-bot
Verify the vulnerable code exists:
grep -n "typeof signature" src/github.js
Output:
19: typeof signature !== 'string' ||
Inspect the vulnerable function:
sed -n '1,80p' src/github.js
Create a PoC file:
cat > poc.js << 'EOF'
async function verifyWebhook(req) {
const signature = req.headers['x-hub-signature-256'];
return (
typeof signature !== 'string' ||
true
);
}
(async () => {
const req = {
headers: {}
};
const result = await verifyWebhook(req);
console.log("[] Missing signature header");
console.log("[] verifyWebhook() returned:", result);
if (result === true) {
console.log("[+] Vulnerability confirmed");
} else {
console.log("[-] Not vulnerable");
}
})();
EOF
Execute the PoC:
node poc.js
Observe the output:
[] Missing signature header
[] verifyWebhook() returned: true
[+] Vulnerability confirmed
Additional verification:
node -e "const signature=undefined; console.log(typeof signature !== 'string' || false)"
Output:
true
This confirms that requests without the X-Hub-Signature-256 header are incorrectly treated as authenticated.
Expected behavior
Requests missing the X-Hub-Signature-256 webhook signature header should be rejected.
verifyWebhook() should return false unless the webhook signature is cryptographically verified using the configured webhook secret.
Actual Behavior
Requests without the X-Hub-Signature-256 header are treated as valid because of incorrect boolean logic:
typeof signature !== 'string' || verify(...)
When the header is missing, the first condition evaluates to true, causing the function to bypass signature verification entirely.
As a result, forged webhook requests may be accepted if the application relies on this function for authentication.
Appwrite version
Appwrite Cloud
Operating system
Linux
Your Environment
OS: Kali Linux
Runtime: Node.js
Repository: appwrite/templates
Component: node/github-issue-bot
File: src/github.js
Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
Have you read the Code of Conduct?
- I have read the Code of Conduct
- Lenguaje dominante
- HTML
- Estrellas
- 174
- Forks
- 129
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 appwrite/templates
-
🐛 Bug Report: query-redis-labs hardcodes Redis port 14714Posiblemente ocupada @sundeep8967 la tomó hace 1 día. Abiertobug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
🐛 Bug Report: discord-command-bot Python build fails in setup.pyPosiblemente ocupada @sundeep8967 la tomó hace 1 día. Abiertobug python
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dependency DashboardAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
-
Enhancement: Add TypeScript definitions (IntelliSense) to Node.js starterPosiblemente ocupada @Ram3ez la tomó hace 327 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de appwrite/templates
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
web-token/jwt-framework#757 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
pypi/pypi-attestations#217 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Adding an LDAP group reports every search failure as "LDAP Group DN is not found"Posiblemente ocupada @Daksha1611 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día