Close Menu
    Main Menu
    • Home
    • News
    • Tech
    • Robotics
    • ML & Research
    • AI
    • Digital Transformation
    • AI Ethics & Regulation
    • Thought Leadership in AI

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Researchers Expose On-line Pretend Foreign money Operation in India

    July 27, 2025

    The very best gaming audio system of 2025: Skilled examined from SteelSeries and extra

    July 27, 2025

    Can Exterior Validation Instruments Enhance Annotation High quality for LLM-as-a-Decide?

    July 27, 2025
    Facebook X (Twitter) Instagram
    UK Tech InsiderUK Tech Insider
    Facebook X (Twitter) Instagram
    UK Tech InsiderUK Tech Insider
    Home»AI Ethics & Regulation»PHP PDO Flaw Permits Attackers to Inject Malicious SQL Instructions
    AI Ethics & Regulation

    PHP PDO Flaw Permits Attackers to Inject Malicious SQL Instructions

    Declan MurphyBy Declan MurphyJuly 21, 2025No Comments3 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr Email Reddit
    PHP PDO Flaw Permits Attackers to Inject Malicious SQL Instructions
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    A crucial vulnerability in PHP’s widely-used PDO (PHP Information Objects) library has been found that permits attackers to inject malicious SQL instructions even when builders implement ready statements appropriately.

    The safety flaw, revealed by means of evaluation of a DownUnderCTF capture-the-flag problem, exploits weaknesses in PDO’s SQL parser and impacts tens of millions of internet functions worldwide.

    Technical Overview of the Vulnerability

    The vulnerability stems from PDO’s default habits of emulating ready statements quite than utilizing native database-prepared statements.

    PDO implements its personal SQL parser to deal with sure parameters, however this parser could be tricked into misinterpreting person enter as sure parameters in contexts the place they shouldn’t be handled as such.

    The assault method includes exploiting eventualities the place person enter seems instantly in ready statements, significantly for column and desk names that can’t be sure as parameters. Take into account this seemingly safe code instance:

    put together("SELECT $col FROM fruit WHERE identify = ?");
    $stmt->execute([$_GET['name']]);
    $knowledge = $stmt->fetchAll(PDO::FETCH_ASSOC);
    ?>

    Attackers can exploit this by injecting specifically crafted payloads containing null bytes and query marks.

    When a payload like ?# is used, PDO’s parser incorrectly identifies the query mark as a sure parameter, resulting in SQL injection.

    The assault works by manipulating PDO’s parsing logic by means of fastidiously constructed payloads.

    As an example, utilizing the payload http://localhost:8000/?identify=x FROM (SELECT table_name AS ‘x from information_schema.tables)y;#&col=?#%00` can efficiently extract database schema data.

    The vulnerability impacts totally different database techniques in a different way. MySQL is susceptible by default until builders explicitly disable PDO::ATTR_EMULATE_PREPARES.

    PostgreSQL turns into susceptible when emulation is enabled, whereas SQLite stays protected on account of its dealing with of null bytes.

    Older PHP variations current even better dangers. PHP 8.3 and earlier variations used a single SQL parser for all database dialects, making them considerably extra susceptible to those assaults.

    Safety researchers advocate a number of defensive measures. Builders ought to disable PDO::ATTR_EMULATE_PREPARES when attainable and guarantee they’re working the most recent PHP model (8.4 or newer). Moreover, functions ought to forestall null bytes from showing in SQL queries.

    The discovery highlights the significance of by no means mixing manually constructed SQL fragments with PDO bindings when utilizing question emulation, as this mixture creates important safety dangers.

    This vulnerability underscores the crucial want for thorough safety testing and the potential risks lurking in seemingly safe code implementations.

    Get Free Final SOC Necessities Guidelines Earlier than you construct, purchase, or swap your SOC for 2025 - Obtain Now

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Declan Murphy
    • Website

    Related Posts

    Researchers Expose On-line Pretend Foreign money Operation in India

    July 27, 2025

    Patchwork Targets Turkish Protection Companies with Spear-Phishing Utilizing Malicious LNK Recordsdata

    July 27, 2025

    Hackers Exploit Official Gaming Mouse Software program to Unfold Home windows-based Xred Malware

    July 26, 2025
    Top Posts

    Researchers Expose On-line Pretend Foreign money Operation in India

    July 27, 2025

    How AI is Redrawing the World’s Electrical energy Maps: Insights from the IEA Report

    April 18, 2025

    Evaluating the Finest AI Video Mills for Social Media

    April 18, 2025

    Utilizing AI To Repair The Innovation Drawback: The Three Step Resolution

    April 18, 2025
    Don't Miss

    Researchers Expose On-line Pretend Foreign money Operation in India

    By Declan MurphyJuly 27, 2025

    Cybersecurity researchers at CloudSEK’s STRIKE crew used facial recognition and GPS knowledge to reveal an…

    The very best gaming audio system of 2025: Skilled examined from SteelSeries and extra

    July 27, 2025

    Can Exterior Validation Instruments Enhance Annotation High quality for LLM-as-a-Decide?

    July 27, 2025

    Robotic house rovers preserve getting caught. Engineers have found out why

    July 27, 2025
    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    UK Tech Insider
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms Of Service
    • Our Authors
    © 2025 UK Tech Insider. All rights reserved by UK Tech Insider.

    Type above and press Enter to search. Press Esc to cancel.