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

    Agentic RAG for Software program Testing with Hybrid Vector-Graph and Multi-Agent Orchestration

    October 21, 2025

    Draganfly and Palladyne associate to develop drone swarms for protection

    October 21, 2025

    Creating AI that issues | MIT Information

    October 21, 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

    Microsoft 365 Copilot Flaw Lets Hackers Steal Delicate Information through Oblique Immediate Injection

    October 21, 2025

    CISOs’ safety priorities reveal an augmented cyber agenda

    October 21, 2025

    Elasticsearch Leak Exposes 6 Billion Information from Scraping, Previous and New Breaches

    October 21, 2025
    Top Posts

    Agentic RAG for Software program Testing with Hybrid Vector-Graph and Multi-Agent Orchestration

    October 21, 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

    Midjourney V7: Quicker, smarter, extra reasonable

    April 18, 2025
    Don't Miss

    Agentic RAG for Software program Testing with Hybrid Vector-Graph and Multi-Agent Orchestration

    By Oliver ChambersOctober 21, 2025

    We current an method to software program testing automation utilizing Agentic Retrieval-Augmented Technology (RAG) methods…

    Draganfly and Palladyne associate to develop drone swarms for protection

    October 21, 2025

    Creating AI that issues | MIT Information

    October 21, 2025

    Microsoft 365 Copilot Flaw Lets Hackers Steal Delicate Information through Oblique Immediate Injection

    October 21, 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.