Lucene search
+L

PostgreSQL Auth Method

🗓️ 02 Aug 2026 20:51:56Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 1 Views

KittySploit identifies the PostgreSQL AuthenticationRequest type for a username.

Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Detect PostgreSQL authentication method from startup handshake."""

from kittysploit import *
from lib.protocols.tcp.tcp_scanner_client import Tcp_scanner_client
from lib.scanner.postgresql.detectors import probe_postgresql


class Module(Scanner, Tcp_scanner_client):
    __info__ = {
        "name": "PostgreSQL Auth Method",
        "description": (
            "Identifies the PostgreSQL AuthenticationRequest type "
            "(trust, cleartext, md5, scram/sasl, …) for a username."
        ),
        "author": ["KittySploit Team"],
        "severity": "info",
        "tags": ["postgresql", "database", "auth", "scanner", "enum"],
        "agent": {
            "risk": "active",
            "effects": ["network_probe"],
            "expected_requests": 1,
            "reversible": True,
            "approval_required": False,
            "produces": ["tech_hints", "risk_signals"],
            "chain": {
                "produces_capabilities": [
                    "service_identified",
                    "db_surface",
                    "pgsql_auth_surface",
                ],
                "consumes_capabilities": [],
                "option_bindings": {},
                "suggested_followups": [
                    "scanner/postgresql/postgresql_empty_password_detect",
                    "auxiliary/scanner/postgresql/postgresql_login_bruteforce",
                ],
            },
        },
    }

    port = OptPort(5432, "Target PostgreSQL port", True)
    username = OptString("postgres", "Username used for startup probe", False)
    database = OptString("postgres", "Database name used for startup probe", False)

    def run(self):
        host = self._host()
        port = self._port()
        if not host or not self.is_tcp_open(host=host, port=port):
            return False
        user = str(self.username or "postgres")
        database = str(self.database or "postgres")
        info = probe_postgresql(
            host=host,
            port=port,
            timeout=self._timeout(),
            user=user,
            database=database,
        )
        if not info.get("detected"):
            return False
        method = str(info.get("auth_method") or "").strip()
        if not method:
            method = "unknown"
        severity = "info"
        if method == "trust":
            severity = "high"
        elif method == "cleartext":
            severity = "medium"
        reason = f"PostgreSQL auth method for {user}@{database}: {method}"
        self.set_info(
            severity=severity,
            reason=reason,
            auth_method=method,
            auth_required=bool(info.get("auth_required")),
            username=user,
            database=database,
        )
        return True

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Aug 2026 20:51Current
5.9Medium risk
Vulners AI Score5.9
1