Zum Hauptinhalt springen
LIVE
CVSS 6.9CVE-2026-137684 | A security flaw has been discovered in eosphoros-ai DB-GPT up to 0.8.3. This affects the function editor_sql_run of the file packages/dbgpt-app/src/dbgpt_app/openapi/api_v1/editor/api_editor_v1.py of the component Editor SQL Run API. Performing a manipulation of the argument db_name results in authorization bypass. It is possible to initiate the attack remotely. The exploit has been released to the public and may be used for attacks. The pull request to fixCVSS 8.7CVE-2026-137992 | libexpat through 2.11.0 contains a denial of service vulnerability in defineAttribute() of lib/xmlparse.c that fails to detect duplicate non-ID #IMPLIED or #REQUIRED attribute declarations. Attackers can supply a crafted XML document with repeated ATTLIST declarations in an internal DTD subset to cause quadratic CPU consumption in storeAtts() during parsing.CVSS 8.5CVE-2026-137994 | Leo through 6.8.10 contains an insecure deserialization vulnerability that allows attackers to execute code by embedding pickled data in unknown XML attributes of .leo outlines. Attackers can place a pickle __reduce__ gadget in a or element attribute that resolveUa passes to pickle.loads, executing code with user privileges when the outline is opened.CVSS 7.0CVE-2026-137995 | FOG Project before 1.6.0.119 contains an information disclosure vulnerability that allows unauthenticated attackers to obtain host tokens from status/hostgetkey.php by supplying a host MAC address. Attackers can present the token to service/hostinfo.php to retrieve decrypted Active Directory join credentials and Windows product keys during deployment windows.CVSS 6.8CVE-2026-137996 | Zettlr before 4.11.0 fails to validate URI schemes in Markdown link targets, allowing attackers to launch arbitrary registered protocol handlers via Electron shell.openExternal without confirmation. Attackers can craft documents whose Ctrl/Cmd-clicked links use smb:// to leak NTLM credential hashes on Windows or invoke custom protocol handlers with attacker-controlled parameters.CVSS 8.5CVE-2026-137997 | HCIPy through 0.7.1 contains an insecure deserialization vulnerability that allows attackers to execute code by supplying crafted .pkl files to read_field, read_grid or read_mode_basis. Because hcipy/util/io.py selects pickle by file extension and calls pickle.load, a __reduce__ gadget in a pupil, apodizer, PSF or mode-basis file runs code with the user's privileges.CVSS 8.5CVE-2026-137998 | Detoxify 0.5.3 through 0.5.4 contains an insecure deserialization vulnerability in load_checkpoint that allows attackers to execute code by supplying a crafted checkpoint file. Attackers can embed a pickle __reduce__ gadget in a .ckpt file loaded via torch.load with weights_only=False to run code with the user's privileges.CVSS 8.5CVE-2026-137999 | JSONSchema2PoPo2 through 3.0.3 contains a code injection vulnerability that allows attackers to inject Python code by supplying JSON Schema default or format values that are written unescaped. Attackers can place a single quote in a string property default to break out of the literal in the generated __init__ signature, executing injected code when the generated module is imported.
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:

💬 Dyskusja społeczności i komentarze

🌐 Dołącz do głównego czatu

Rozpocznij dyskusję w strumieniu transmisji Social Chat lub prześlij wyżej wkład ekspercki przez formularz uzupełnień.

Community Rating &amp; Social Proof
⭐ Ocena czytelników
–
Ø / 5.0
Brak recenzji czytelników
Czy ten artykuł był pomocny?
0
Dodaj swoją ocenę
Ocena szczegółowa (opcjonalnie)
Treść i jakość
Źródło i wiarygodność
Aktualność
Security Briefing Bezpłatnie · Wypisanie 1 kliknięciem

Intelligence Digest - bezpłatnie

Codziennie najważniejsze wiadomości bezpieczeństwa · można pobrać w każdej chwili

Powiązany klaster opowieści i źródła (wektor AI)

2 Cluster
2 źródeł
OpenAI counter-sues Apple over trade secret theft
AppleInsider News 49 minut temu
1 inne źródło
Podobne wkłady
🔍 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...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Laden...

Składki są załadowane...

Laden...

Filmy są załadowane...

Uwagi Komentarze są ładowane..
Rysunek do aktualizacji
Widgets & Topics
Loading widgets…
Nächster Beitrag