Zum Hauptinhalt springen
LIVE
CVSS 7.0CVE-2026-138158 | libgphoto2 through 2.5.34 contains a stack buffer overflow in sierra_get_string_register() that lets a malicious sierra-protocol camera or USB device overwrite stack memory. When files are listed, the device can answer the file-name register with an oversized packet, writing up to 32 KB past small stack buffers to cause crashes or possible code execution.CVSS 7.7CVE-2026-138159 | edbrowse through 3.8.19 contains an integer overflow in stringAndBytes() that allows malicious servers to write past a heap buffer by sending response bodies larger than 2 GB. When a user browses to an attacker-controlled HTTP, FTP, or gopher server, the oversized body skips reallocation and corrupts the heap, causing crashes or potentially code execution.CVSS 8.5CVE-2026-138160 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in ReadBackupTextLen() that allows attackers to overwrite stack memory via crafted backup files. Attackers can supply overlong quoted text values decoded into a 10,000-byte stack array during convertbackup, restore, or GSM_ReadBackupFile calls, causing crashes or potential code execution.CVSS 8.5CVE-2026-138161 | Gammu before 1.45.2 contains a buffer overflow vulnerability in LoadBackup() that allows attackers to corrupt memory by supplying an overlong MD5 value in a crafted backup file. Attackers can overwrite adjacent phonebook and calendar entry pointers via strcpy() into MD5Original when files are loaded with convertbackup or restore, causing crashes or potential code execution.CVSS 7.3CVE-2026-138162 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in ALCATEL_EncodeString() that allows attackers to overwrite stack memory via oversized encoded phonebook text. Attackers can supply a crafted backup restored with gammu restore or addnew to an attached Alcatel phone, using GSM extension characters to crash Gammu or potentially execute code.CVSS 8.5CVE-2026-138163 | Gammu before 1.45.2 contains a heap-based buffer overflow in ReadWAPSettingsEntry() that allows attackers to corrupt heap memory via crafted backup files with excess WAP or MMS settings entries. Attackers can supply a backup with more than four TitleNN keys in a [WAPSettings] or [MMSSettings] section, loaded via convertbackup, restore, or GSM_ReadBackupFile, causing crashes or potential code execution.CVSS 4.8CVE-2026-138164 | Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in SaveBackupText() in backtext.c that allows attackers to corrupt stack memory by supplying long text fields. Attackers can craft a backup with long calendar or note fields that, when converted with gammu convertbackup, writes hex digits past the 10,000-byte stack buffer.CVSS 9.3CVE-2026-138154 | POSTAL 2 before build 26810491 contains a sandbox escape vulnerability that allows malicious Steam Workshop mods to execute code by calling ConsoleCommand with a start file URI. Attackers can ship a batch file in a mod at the predictable workshop install path and launch it via ShellExecuteW, executing commands as the player on Windows.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

Debugging a Firebase Admin Panel — Wrong DB Node, Bad Key Mapping and a Date.now() ID Bug

The admin panel I use to manage a sales team collects leads from multiple sources. One of them is a Facebook campaign for distributing POS terminals, landing…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 5 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung

The admin panel I use to manage a sales team collects leads from multiple sources. One of them is a Facebook campaign for distributing POS terminals, landing in a separate Firebase Realtime Database that until now was only visible through the Firebase Console web UI. The goal: surface those leads directly in the Admin, in a dedicated section for authorized users, sorted by submission date.



Adding a new tab to the existing sidebar dispatcher is a surgical operation — three touch points (tabs array, labels map, else if dispatcher) plus the actual render function. What should've been routine turned into three separate, unrelated bugs, each hiding the next.






Problem one: wrong DB node



The first version of the load function pointed at the database root:




// ❌ Points to root — returns null
const url = 'https://[MY-PROJECT]-default-rtdb.firebasedatabase.app/.json';

// ✅ Data lives under the /leads node
const url = 'https://[MY-PROJECT]-default-rtdb.firebasedatabase.app/leads.json';






The database had read rules open only on the leads node, not at the root. A fetch to /.json returned null because the root itself isn't accessible under proper rules. The fix was a three-character change to the URL.




Firebase RTDB rule: read rules are applied node by node. Having ".read": true on /leads does not grant access to the root. Always test the direct URL in the browser before writing any code.







Problem two: wrong mapping keys



Past the node problem, the table loaded but every column showed dashes (—). Records existed, but no field read correctly — because I'd guessed key names instead of verifying them.



The original mapping used "intuitive" names like tipo_pos, quantita, cliente — while the DB actually contained:




// Actual keys in the Firebase DB
{
"cognome": "Roversi",
"nome": "Andrea",
"email": "email@example.com",
"piano": "Smart",
"pos_quantita": 1,
"pos_tipo": "POS con Stampante",
"source": "facebook-lead",
"timestamp": "2026-06-09T11:29:19.980Z",
"tipo_cliente": "Privati & Startup"
}






Once the keys were corrected, everything read fine. The ISO 8601 timestamp gets formatted with toLocaleDateString('it-IT') before display.




Quick debug technique: if you can't fetch directly from your dev environment, just open the .json URL in the browser. Firebase RTDB returns readable JSON with exact key names, no tooling required.







Problem three: the dynamic ID that cut records in half



With correct keys the table loaded — but showed only 2 records out of 4 in the DB. No console errors, no filters applied, all the data was there. This was the tricky one.






Root cause: setTimeout + Date.now()-based ID



renderSection() was generating a unique container ID on every call:




function renderSection() {
const containerId = 'section_' + Date.now(); // ← unique ID on every render

const html = `<div id="${containerId}">Loading...</div>`;
mainArea.innerHTML = html;

// Timeout fires AFTER the DOM is updated
setTimeout(() => _loadSection(containerId), 50);
}






When the user clicked the tab, renderSection() fired twice in quick succession — once from the click, once from the internal routing system syncing state. The second call overwrote the DOM with a new container ID before the first call's setTimeout fired. When that timeout ran, it looked for the old ID — gone, nothing written. The second call succeeded but caught the fetch mid-flight. Net result: anywhere between 2 and 4 records visible depending on device speed.






Fix: fixed ID + requestAnimationFrame






function renderSection() {
const containerId = '_sectionContainer'; // ← fixed, stable ID

const html = `<div id="${containerId}">Loading...</div>`;
mainArea.innerHTML = html;

// requestAnimationFrame guarantees the DOM is updated
// before looking up the container — more reliable than setTimeout
requestAnimationFrame(() => _loadSection(containerId));
}






With a fixed ID, any subsequent call always finds the same container, so the last render wins correctly. requestAnimationFrame runs the callback in the next browser frame, after layout is calculated and the node is guaranteed present — no arbitrary millisecond guess involved.




General rule: setTimeout(fn, N) to wait for a DOM update is fragile — the right N depends on device speed. requestAnimationFrame is deterministic: it fires exactly after the browser finishes rendering the current frame.







Table layout without horizontal scroll



Once the loading bugs were fixed, the table overflowed horizontally. The culprit: white-space: nowrap on cells combined with generous padding preventing text wrap.




/* Fixed layout with percentage column widths */
table {
table-layout: fixed;
width: 100%;
font-size: 12px;
}

/* Widths declared on the header row */
th:nth-child(1) { width: 11%; } /* Last name */
th:nth-child(2) { width: 10%; } /* First name */
th:nth-child(3) { width: 20%; } /* Email */
th:nth-child(4) { width: 18%; } /* POS type */
th:nth-child(5) { width: 7%; } /* Qty */
th:nth-child(6) { width: 15%; } /* Client type */
th:nth-child(7) { width: 9%; } /* Plan */
th:nth-child(8) { width: 10%; } /* Date */

td {
word-break: break-word; /* Long text wraps */
padding: 7px 8px;
}

/* Only Date and Qty stay single-line */
td:nth-child(5),
td:nth-child(8) {
white-space: nowrap;
}






With table-layout: fixed, the browser distributes widths from the declared header values instead of calculating from cell content — a predictable, stable table with no horizontal scroll.






Lessons learned





  1. Always test the Firebase URL in the browser before writing fetch code. Opening https://<db>.firebasedatabase.app/<node>.json directly reveals the node, data structure, and exact key names in seconds.


  2. Never guess the key names of an external DB. "Intuitive" names seem obvious until the DB uses something else entirely. Always verify from actual data.


  3. setTimeout to wait for the DOM is fragile; requestAnimationFrame is deterministic. A setTimeout(fn, 50) "to give the DOM time to update" is a red flag — the delay works on your machine but may not on a slower device or under rapid re-renders.


  4. Dynamic container IDs are dangerous when re-renders happen. An ID based on Date.now() generates a new identifier every call; any code referencing the "old" ID hits a dead end. Fixed, semantic IDs eliminate this entire bug class.


  5. table-layout: fixed with percentage widths is the right call for responsive tables — letting the browser calculate from content leads to unpredictable results.






Full write-up on my blog: roversia.it/blog-05-paypos-firebase-admin.html

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating &amp; Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
21 Quellen
CVE-2026-72109 | Linux Kernel up to 7.1.4 sparx5 sparx5_register_notifier_blocks allocation of resources (WID-SEC-2026-2852)
VulDB Updates vor 1 Std.
20 weitere Quellen
VulDB Updatesvor 1 Std.CVE-2026-72110 | Linux Kernel up to 7.2-rc1 BPF bpf_local_storage_destroy use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72112 | Linux Kernel up to 7.1.4/7.2-rc3 BPF Ops io_uring io_install_bpf priv/ring_fd use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72113 | Linux Kernel up to 7.2-rc3 bcm bcm.c bcm_release/bcm_delete_rx_op/bcm_notifier rx_reg_dev use after free (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72114 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_setup len buffer overflow (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72115 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72116 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_setup race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72117 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler locking (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72118 | Linux Kernel up to 7.2-rc3 bcm bcm_rx_handler race condition (WID-SEC-2026-2852) VulDB Updatesvor 1 Std.CVE-2026-72119 | Linux Kernel up to 7.2-rc3 bcm net/can/bcm.c bcm_tx_setup race condition (WID-SEC-2026-2852) DEV Communityvor 3 Std.Knuth's moratorium on error reports: what his page says, why repeats cost time, and what curl and the Linux kernel did VulDB Updatesvor 3 Std.CVE-2026-72099 | Linux Kernel up to 7.2-rc2 dm-integrity infinite loop (Nessus ID 364704 / WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72100 | Linux Kernel up to 6.12.96/6.18.39/7.1.4/7.2-rc2 dm-integrity deadlock (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72101 | Linux Kernel up to 6.12.100/6.18.39/7.1.4/7.2-rc2 dm-integrity uninitialized pointer (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72103 | Linux Kernel up to 6.12.100/6.18.41/7.1.4/7.2-rc2 dm-crypt crypt_set_keyring_key information disclosure (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72102 | Linux Kernel up to 7.2-rc2 Device Mapper dm_early_create use after free (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72104 | Linux Kernel up to 6.18.39/7.1.4/7.2-rc2 dm-pcache parse_cache_opts null pointer dereference (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72105 | Linux Kernel up to 7.2-rc2 dm-log out-of-bounds write (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72107 | Linux Kernel up to 7.2-rc2 dm era writeset_marked out-of-bounds (WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72106 | Linux Kernel up to 7.2-rc2 dm-ioctl list_version_get_info buffer overflow (Nessus ID 335743 / WID-SEC-2026-2852) VulDB Updatesvor 3 Std.CVE-2026-72108 | Linux Kernel up to 7.2-rc2 dm thin metadata __reserve_metadata_snap/__release_metadata_snap reference count (WID-SEC-2026-2852)
19 Quellen
'King-sized' Black Friday deal: Save 79% off Paramount+
Latest from TechRadar vor 47 Min.
18 weitere Quellen
Latest from TechRadarvor 38 Min.Big features, tiny price tags: The 4 best-value VPN deals of Black Friday 2026 Latest from Windows Centralvor 1 Std.The best Xbox and PC Black Friday deals you need to know about without the fluff WIREDvor 2 Std.HexClad Pans Black Friday Sale: Save Up to $70 (2026) WIREDvor 2 Std.Oura Ring 5 Is $100 Off This Black Friday and Cyber Week (2026) Latest from TechRadarvor 3 Std.I tried 20+ Android TV VPNs this year and these are the ones I’d save on this Black Friday — VPNs for beginners, 4K streaming, and good savings CNETvor 3 Std.I Love This Fender Speaker for Its Looks and Its Bass, and It’s Still $45 Off After Black Friday WIREDvor 3 Std.Air Purifier Black Friday Sale: Levoit, Blueair (2026) Latest from TechRadarvor 3 Std.Black Friday MacBook deals 2026: even bigger savings on MacBook Neo, MacBook Pro M6, and the new PROLED MacBook Pros as Cyber Monday draws near WIREDvor 3 Std.The Best Black Friday MacBook Deals Take Up to $300 Off The Vergevor 3 Std.A tech girlie’s Black Friday guide to fabulous nails WIREDvor 3 Std.The Best Black Friday Action Camera Deals (2026) Latest from Windows Centralvor 4 Std.Bought a new PC or monitor on Black Friday? Don't plug it into a cheap power strip Latest from TechRadarvor 4 Std.Here’s the best Black Friday MacBook Air deal available right now Latest from TechRadarvor 4 Std.I've reviewed a whole host of docking stations — here are the 8 worth buying in the holiday deals now Black Friday is done Latest from TechRadarvor 4 Std.FastestVPN vs PrivadoVPN vs Windscribe: which cheap VPN should you buy this Black Friday? Latest from TechRadarvor 4 Std.Walmart's Black Friday event ends tomorrow — see the 20 best last chance deals on TVs, appliances, laptops, headphones, ahead of Cyber Monday WIREDvor 4 Std.Best JBL Black Friday Deals (2026): Save on JBL Flip 7 and More The Vergevor 4 Std.Birdbuddy’s latest smart feeders are still at their low Black Friday prices
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Debugging a Firebase Admin Panel — Wrong DB Node, Bad Key Mapping and a Date.now() ID Bug

Thematisch verwandte Begriffe: Debugging, Firebase, Admin, Panel · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag