type-juggling

Probe PHP loose comparisons to verify authentication and signature bypasses.

241|28|Updated May 20, 2026
One-click install
npx skills add https://github.com/ok-helloworld/vibe-pentest --skill type-juggling-ok-helloworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-juggling
Source: https://github.com/ok-helloworld/vibe-pentest/tree/main/references/pentest_skills/type-juggling
Command: npx skills add https://github.com/ok-helloworld/vibe-pentest --skill type-juggling-ok-helloworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you identify and verify authentication and signature validation bypasses caused by PHP type juggling and loose comparisons, rather than wasting time on blind guessing.

Core Features & Use Cases

  • Loose comparison analysis: Pinpoint cases where ==/!= is used for secrets (passwords, tokens, hashes) and determine which coercion rules are in play.
  • Magic hash detection: Guide testing for 0e...-style hashes that can evaluate as equal under loose comparison.
  • Audit-and-verification oriented workflow: Provide payload shapes and a decision path to reproduce server behavior safely in an authorized lab.

Quick Start

Ask the AI to help you assess a PHP login or token check that uses loose equality and propose the most likely type-juggling or magic-hash paths to validate.

Frequently Asked Questions about type-juggling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does PHP type juggling enable authentication bypass with loose comparison?

PHP type juggling enables authentication bypass when loose comparison operators (`==`/`!=`) coerce attacker-controlled inputs to match secrets. This Skill identifies vulnerable endpoints and verifies bypasses by testing magic hashes, NULL, and array coercion edge cases.

What is a magic hash and how do I test it for HMAC bypass?

A magic hash is a `0e...` formatted hash digest that PHP evaluates as zero under loose comparison, enabling HMAC bypass. This Skill guides testing for magic hash vulnerabilities and other type coercion issues in signature validation endpoints.

How do I find weak equality bypasses in PHP token validation endpoints?

To find weak equality bypasses in PHP token validation, this Skill analyzes endpoints using `==`/`!=` instead of strict equality or `hash_equals`. It routes probes based on the comparison sink and PHP version to target type juggling vulnerabilities.

When should I use strict equality instead of loose comparison for password checks?

You should use strict equality or `hash_equals` for password checks whenever attacker-controlled inputs are compared to secrets. This Skill helps identify endpoints failing to do so, verifying loose comparison vulnerabilities in authorized testing contexts.

Can type juggling bypass signature validation if the code uses hash_equals?

Type juggling cannot bypass signature validation if the code uses `hash_equals` or strict equality (`===`). This Skill specifically targets endpoints using loose comparison (`==`/`!=`) for HMAC and hash digest checks where type coercion applies.

How do I reproduce PHP weak comparison behavior safely in a lab environment?

To reproduce PHP weak comparison behavior safely, this Skill provides payload shapes and decision paths for authorized lab testing. It verifies server behavior by targeting magic hash and NULL/array coercion edge cases based on the comparison sink.