Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

node-red-contrib-afya-ksef

Latest version: v1.1.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
npm package Publisher: afya
0 Stars
0 Forks
3 Versions
JavaScript Repo language

Scan summary

node-red-contrib-afya-ksef was last scanned on 30 Nov 2026 at version 1.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions, all published on 30 Nov 2026.
  • Findings: No rules fired in version 1.1.0.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.1.0 LATEST 30 Nov 2026 No rules fired
1.0.0 30 Nov 2026 No rules fired
0.0.0-stage 30 Nov 2026 Not shown

No rules fired in 1.1.0

Findings

Findings for v1.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

node-red-contrib-afya-ksef

license: MIT

Node-RED node for KSeF (Krajowy System e-Faktur – the Polish National e-Invoice System, API 2.0): it reads this month's invoices – sales = revenue and purchases = costs – tells you which invoices are new, with their KSeF numbers, and gives a ready SMS text. An optional web page shows both journals with totals and a “Do przelewu” list with the bank accounts of your suppliers – every number has a copy button. Log in with a KSeF token or a KSeF certificate (.crt + .key). No dependencies.

English · Polski · part of dobry.doctor


English

[inject every 1 h] → [ksef invoices] ─┬─► [switch: payload.tekstPrzychody not empty] → [SMS: new revenue]
                                      └─► [switch: payload.tekstKoszty not empty]    → [SMS: new cost]

Example SMS (Polish, as it goes to Polish users):

Przychód 1 234,50 zł netto – Firma Pacjenta S.A., FV FV/12/11/2026, KSeF 5265877635-20261103-0100000000AA-01
Koszt 5 068,22 zł – Hurtownia Medyczna Sp. z o.o., termin 16.11.2026, FV HM/77/2026, KSeF 3225081610-20261102-0200000000CC-03
Install

Requires Node.js ≥ 18.17 and Node-RED ≥ 3.

cd ~/.node-red
npm install node-red-contrib-afya-ksef
# or straight from GitHub:
npm install github:mchuc/node-red-contrib-afya-ksef

Restart Node-RED. The node ksef invoices appears in the AFYA palette group.

Log in to KSeF
Method What you need
KSeF token Generate it in Aplikacja Podatnika KSeF → Tokeny. Reading invoices needs only the permission przeglądanie faktur (InvoiceRead). The node encrypts `token
KSeF certificate A certificate of type Uwierzytelnianie from Aplikacja Podatnika KSeF: the .crt file, the .key file and the password you set for the key. Upload both files in the edit dialog. The node signs the KSeF login request (AuthTokenRequest, XAdES-BES, RSA or EC) itself.

Both are stored as Node-RED credentials and never exported with the flow. The access token is refreshed with the refresh token, so a full login happens only about once a week. A .p12 / .pfx file has to be split first: openssl pkcs12 -in cert.p12 -clcerts -nokeys -out cert.crt and openssl pkcs12 -in cert.p12 -nocerts -out cert.key.

Configuration
Field Description
Labels Language of the edit dialog: system language (Polish for a Polish system, English otherwise), English or Polski. Only the descriptions change.
Environment Production (real invoices), Demo or Test.
Company NIP The company the invoices belong to (login context). Checked against the NIP checksum.
Log in with KSeF token or KSeF certificate (see above). Identify by: certificate subject (NIP/PESEL) or certificate fingerprint.
Amounts net, gross or both (net, VAT, gross) – in the tables, totals and %kwota%.
Month by issue date – an invoice belongs to the month it was issued in; date received in KSeF – the month the KSeF number was given (for costs, this is the legal date of receipt).
Also check the previous month On (default): invoices dated last month that arrive late are caught too.
Send info about a new sales / purchase invoice Texts in payload.tekstPrzychody and payload.tekstKoszty, each with its own template.
Without Polish letters ą→a, ł→l and typographic dashes/quotes → ASCII, so one SMS holds 160 instead of 70 characters.
Append the month totals Adds \| 11.2026: przychody …, koszty …, wynik … to every line.
Transfers Reads the bank account, due date, payment form, split payment (MPP) and “paid” flag from each purchase invoice XML (once per invoice). Transfer amount: gross (or do zapłaty from the invoice) or net. Copied amount: 1518.44 (dot) or 1518,44 (comma).
Invoice page Page path, title, password and/or access token (see below).
Variable Optional: the last msg.payload also in a global or flow context variable.

Placeholders: %kwota% %netto% %vat% %brutto% %kontrahent% %nip% %numer% %ksef% %data% %typ% %waluta% %miesiac% %suma% %firma%, and for purchase invoices %platnosc% (account, due date, ⚠ different amount in the notes) %przelew% (transfer amount) %konto% %termin%.

Defaults: Przychód %kwota% – %kontrahent%, FV %numer%, KSeF %ksef% and Koszt %kwota% – %kontrahent%, FV %numer%, %platnosc%, KSeF %ksef%.

KSeF limits

KSeF allows 20 invoice-list queries per hour per company. One check makes 2 queries per month (sales + purchases) – 4 with the previous month – so inject every hour (never more often than every 15 minutes). After 429 Too Many Requests the node waits as long as KSeF asks and does not call KSeF in between. Invoice XML downloads (for the transfer data) have their own limit of 64 per hour; the node downloads at most 12 per check, new invoices first, and every invoice only once.

Invoice page

With Show a web page the node serves http://<node-red>:1880/afya/ksef (under httpNodeRoot):

  • a big status bar: when KSeF was checked and whether the login worked (green), the error (red) or a warning after 3 hours without a check – so you know the system works,
  • company and NIP, tiles: revenue (received / waiting for), costs (paid / to pay) and operating profit – current (received − paid) and expected (all revenue − all costs), net, gross or both,
  • two tables like a journal – Przychody (sales) and Koszty (purchases): issue date, due date, invoice number, counterparty with NIP (purchases: also the bank account with kopiuj), KSeF number with a kopiuj (copy) button, amounts and a total row; sort by issue date or by due date,
  • ☐ / ☑ in every row – costs: paid, revenue: received; tick it on the page, it is saved in Node-RED (separate file, survives restarts); invoices marked as paid in their XML are ticked for good. Paid transfer cards move below a line, so only the unpaid ones stay on top,
  • PDF and XML for every invoice: PDF opens a readable invoice (parties, items, VAT summary, settlement, payment, notes, attachment, KSeF verification link) with Save PDF / print; amounts in payment notes are highlighted. XML shows / downloads the KSeF file. Downloaded XML is cached for 30 days,
  • ⚠ different amount in the notes – when a note on the invoice (additional description, payment description, attachment) mentions an amount to pay that is not the invoice amount, the row and the transfer card warn you,
  • Do przelewu under the costs: recipient, bank account, amount, title (invoice number), each with a kopiuj button; due date (overdue in red), paid invoices dimmed, split payment (MPP) with the VAT amount, factor account, payment link; a wrong account checksum is flagged,
  • clicking an amount in the tables copies it as 1518.44 (or 1518,44),
  • arrows switch between the stored months (up to 13), badges for new invoices (last 48 h) and corrections,
  • works on a phone and in dark mode, refreshes itself every 15 minutes.

Copying works over plain http:// in the local network too (where the browser blocks the clipboard API).

Access – exactly like the Librus page: a password (login form, HttpOnly cookie for 30 days, changing the password logs everyone out) and/or an access token (…/afya/ksef?token=…, no login – keep the link like a password). Without either the page stays off; 10 wrong tries in 15 minutes block the address for a while. Put the page behind HTTPS / VPN when it is reachable from the internet – it shows financial data.

Output (msg.payload)

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm node-red-contrib-afya-ksef

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229