Zum Hauptinhalt springen
LIVE
CVSS 8.7CVE-2026-138346 | In Y Soft SAFEQ Cloud PC Client for Windows and macOS before 2026.09.03.4, under specific conditions, an attacker who already has access to a workstation running the PC Client, and who has specific knowledge of the customer's environment and the targeted workstation, could access files on another workstation running the PC Client within the same organization, including locally stored print jobs (local storage or hybrid mode). Access from outside the customerCVSS 9.4CVE-2026-138199 | A vulnerability was found in D-Link DIR-629 1.03.B01 CN. This affects the function dhcps4start of the file /etc/services/DHCPS/dhcpserver.php of the component DHCP Server. The manipulation of the argument domain results in os command injection. The attack may be performed from remote. The exploit has been made public and could be used.CVSS 5.3CVE-2026-138170 | A security flaw has been discovered in itsourcecode Event Management System 1.0. This issue affects some unknown processing of the file /admin/view_event.php. Performing a manipulation of the argument ID results in sql injection. The attack may be initiated remotely. The exploit has been released to the public and may be used for attacks.CVSS 5.1CVE-2026-138169 | A vulnerability was identified in itsourcecode Insurance Management System 1.0. This vulnerability affects unknown code of the file updateNominee.php. Such manipulation of the argument nominee_id leads to sql injection. The attack can be launched remotely. The exploit is publicly available and might be used.CVSS 5.3CVE-2026-138168 | A vulnerability was determined in itsourcecode Insurance Management System 1.0. This affects an unknown part of the file updateClient.php. This manipulation of the argument client_id causes sql injection. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized.CVSS 4.8CVE-2026-138167 | A vulnerability was found in OpenHands software-agent-sdk up to 1.64.1. Affected by this issue is the function FileSettingsStore.load of the file openhands/agent_server/persistence/store.py of the component agent_server. The manipulation results in incorrect authorization. Attacking locally is a requirement. The exploit has been made public and could be used.CVSS 6.9CVE-2026-138166 | A vulnerability has been found in wxiaoqi Spring-Cloud-Platform up to 3.0. Affected by this vulnerability is the function RsaKeyHelper.generateKey of the file ace-modules/ace-admin/src/main/resources/application.yml of the component JWT Authentication. The manipulation of the argument rsa-secret leads to use of hard-coded cryptographic key . It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The proCVSS 10.0CVE-2026-138165 | A flaw has been found in D-Link R15 up to 1.22. Affected is an unknown function of the file /flupl/nodered of the component Upload Handler. Executing a manipulation of the argument filename can lead to os command injection. The attack may be performed from remote. The exploit has been published and may be used.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

JSON Schema in Dart

Everything which distinguishes man from the animals depends upon this ability to volatilize perceptual metaphors in a schema, and thus to dissolve an image…

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

Everything which distinguishes man from the animals depends upon this ability to volatilize perceptual metaphors in a schema, and thus to dissolve an image into a concept.

-- Friedrich Niezsche




When you know how to encode and decode JSON data, it can become annoying to deal with the structure every time. Worse, it can become a nightmare when some kind of data structure are being upgraded. That why some people created JSON Schema. The idea is to define what kind of fields and values should be contained in JSON objects. A package called json_schema was created to implement this standard.






Bootstrapping






$ dart create validate
Creating validate using template console...

.gitignore
analysis_options.yaml
CHANGELOG.md
pubspec.yaml
README.md
bin/validate.dart
lib/validate.dart
test/validate_test.dart

Running pub get... 0.3s
Resolving dependencies...
Downloading packages...
Changed 48 dependencies!
3 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.

Created project validate in validate! In order to get started, run the following commands:

cd validate
dart run

$ cd validate

$ dart pub add json_schema
Resolving dependencies...
Downloading packages...
_fe_analyzer_shared 103.0.0 (104.0.0 available)
analyzer 13.3.0 (14.0.0 available)
+ http 1.6.0
+ json_schema 5.2.2
package_config 2.2.0 (3.0.0 available)
+ quiver 3.2.2
+ rfc_6901 0.2.1
+ uri 1.0.0
Changed 5 dependencies!
3 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.






We can edit bin/validate.dart and import the json_schema package.




import 'package:json_schema/json_schema.dart';









Schema Conception




Don't trust, just verify.

-- Steven Levitt




For this example, we will use the examples present in the JSON Schema Getting Started tutorial. Their first JSON object looks like that:




{
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
]
}






To help us with the tests, we can create a function helper instantiating a schema and validating data. Let call it validate(). To instantiate a new JsonSchema object, the JsonSchema.create() static function can be invoked. Then, the JsonSchema.validate() method will be called to check if the data passed is correct.




void validate(Map<String, dynamic> schema, Map<String, dynamic> data, {String? msg}) {
if (msg!=null) print("${msg}:");
final _schema = JsonSchema.create(schema);
final validate = _schema.validate(data);
print(" ${validate}: ${data}");
print("");
}






Before doing the whole specification for this object, we can start to specify only one of those fields, like the productId. json_schema module can use both a Map<String, dynamic> or a JSON<String> to load this. To make our life easier, we will create functions wrapper returning the schema we want as a Map.




Map<String, dynamic> _productId() {
return {
"description": "The unique identifier for a product",
"type": "integer",
};
}






A JSON schema describe an object and its properties. A productId is an integer. The description field is not used by the validator, it's only a way to help developers and designer to understand the structure. An object can be defined by many types:




  • null (e.g. null);


  • boolean (e.g. true or false);


  • number (e.g. 1 or -1.23);


  • integer (e.g 1 or 1024);


  • string (e.g. "test");


  • object (e.g. {});


  • array (e.g. []).




All of them are coming from the JSON specification itself.




Map<String, dynamic> _productName() {               
return {
"description": "Name of the product",
"type": "string"
};
}






The productName is a string. Nothing complex here, the schema is similar to the productId object.




Map<String, dynamic> _price() {
return {
"description": "The price of the product",
"type": "number",
"exclusiveMinimum": 0
};
}






A price is a number. To avoid negative numbers, we are also enforcing the specification with the exclusiveMinimum parameter. If a price is negative, the schema becomes invalid.




Map<String, dynamic> _tags() {
return {
"description": "Tags for the product",
"type": "array",
"items": {
"type": "string"
},
"minitems": 1,
"uniqueItems": true
};
}






Compound terms can also be created. The tags object is defined as an array or string. It must have at least 1 items (see minitems parameter) and must contain only unique items (see uniqueItems parameter).




Map<String, dynamic> _dimensions() {
return {
"type": "object",
"properties": {
"length": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
}
},
"required": [ "length", "width", "height" ]
};
}






Another object can be defined. It is also a compound term. In our case, the dimensions of an item must have a length as number, a width as number and a height as number too. All those fields are required (see required).




Map<String, dynamic> fullSchema() {
return {
"\$schema": "https://json-schema.org/draft/2020-12/schema",
"\$id": "https://example.com/product.schema.json",
"title": "Product",
"description": "A product in the catalog",
"type": "object",
"required": [
"productId",
"productName",
"price",
],
"properties": {
"productId": _productId(),
"productName": _productName(),
"price": _price(),
"tags": _tags(),
"dimensions": _dimensions()
}
};
}






Finally, the function fullSchema() is containing the whole JSON schema. Lot of fields here a kinda mandatory and are directly related to the JSON Schema specification. Let test that in our main entry-point.




void main(List<String> arguments) {
validate(fullSchema(), {}, msg: "empty data");

validate(fullSchema(), {
"productId": 1
}, msg: "productId only");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50
}, msg: "minimal valid data");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
]
}, msg: "valid data with tags");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
],
"dimensions": {
"length": 1,
"width": 2,
"height": 3,
}
}, msg: "valid data with tags and dimensions");
}






We can now run this application to see the result.




$ dart run
Resolving dependencies in `/tmp/dart/validate`...
Downloading packages...
Got dependencies in `/tmp/dart/validate`.
Building package executable...
Built validate:validate.

empty data:
INVALID, Errors: [# (root): required prop missing: productId from {}, /productId: required prop missing: productId from {}, # (root): required prop missing: productName from {}, /productName: required prop missing: productName from {}, # (root): required prop missing: price from {}, /price: required prop missing: price from {}]: {}

productId only:
INVALID, Errors: [# (root): required prop missing: productName from {productId: 1}, /productName: required prop missing: productName from {productId: 1}, # (root): required prop missing: price from {productId: 1}, /price: required prop missing: price from {productId: 1}]: {productId: 1}

minimal valid data:
VALID: {productId: 1, productName: A green door, price: 12.5}

valid data with tags:
VALID: {productId: 1, productName: A green door, price: 12.5, tags: [home, green]}

valid data with tags and dimensions:
VALID: {productId: 1, productName: A green door, price: 12.5, tags: [home, green], dimensions: {length: 1, width: 2, height: 3}}






As you can see, if the data received is missing some fields, the data is considered invalid. In other hands, if the requirements are there, the data is considered valid. Great, right? We now have a way to control the data received (or to control what we are sending).






Conclusion




Without approval and without scorn, but carefully studying the sentences word by word, one should trace them in the Discourses and verify them by the Discipline. If they are neither traceable in the Discourses nor verifiable by the Discipline, one must conclude thus: 'Certainly, this is not the Blessed One's utterance; this has been misunderstood by that bhikkhu - or by that community, or by those elders, or by that elder.' In that way, bhikkhus, you should reject it.

-- Siddharta Gautama




JSON Schema is a good way to make your application resilient and stable. It can be used as documentation tool, it will help to create tests, and it will also ensure the data received are legit. If you are working with public APIs, it can also help you to create the OpenAPI specifications. Finally, it will help you to design your application by thinking on what it needs, it will lead to a lean application containing only the necessary values.



JSON Schema can also be used to help us to reverse engineer private API interfaces by documenting what kind of data is working and which ones are not working. Creating specifications is great, Enjoy.



Wants to know more about JSON Schema? Here few interesting resources for you.





Happy Hack and Have fun!






Cover Image by Alex wong on Unsplash

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ń.

Cyber Threat Intelligence i Kryminalistyka

Navigator ATT&CK · Radar IoC i Graf

IoC Intelligence
1 Indikatoren · Defanged · STIX 2.1
dev[.]to
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
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)

6 Cluster
32 źródeł
CVE-2026-72260 | Linux Kernel up to 6.6.147/6.12.100/6.18.39/7.1.4 ASoC mediatek mt8192 pm_runtime_get_sync unusual condition (WID-SEC-2026-2852)
VulDB Updates 57 minut temu
31 kolejnych źródeł
VulDB Updates57 minut temuCVE-2026-72264 | Linux Kernel up to 7.1.4 tridentfb trident_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72263 | Linux Kernel up to 7.1.4 ASoC snd_sof_load_topology memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72265 | Linux Kernel up to 7.1.4 fbdev nvidiafb_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72266 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 vesafb vesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72267 | Linux Kernel up to 7.1.4 carminefb alloc_carmine_fb memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72269 | Linux Kernel up to 7.1.4 fbdev uvesafb_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72268 | Linux Kernel up to 7.1.4 fbdev tdfxfb_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72271 | Linux Kernel up to 7.1.4 i740fb i740fb_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72270 | Linux Kernel up to 7.1.4 fbdev s3_pci_probe memory leak (WID-SEC-2026-2852) VulDB Updates57 minut temuCVE-2026-72272 | Linux Kernel up to 7.1.4 fbdev/radeon radeonfb_pci_register memory leak (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72249 | Linux Kernel up to 7.1.4/7.2-rc2 flowtable input validation (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72250 | Linux Kernel up to 7.2-rc2 netfilter net/ipv6/reassembly.c nf_ct_frag6_reasm state issue (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72252 | Linux Kernel up to 7.2-rc1 nft_set_pipapo out-of-bounds write (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72253 | Linux Kernel up to 7.2-rc1 nf_conntrack_sip skb_dst null pointer dereference (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72255 | Linux Kernel up to 7.1.4 nf_queue __nf_queue reference count (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72256 | Linux Kernel up to 7.1.4 xt_cluster xt_cluster_mt initialization (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72257 | Linux Kernel up to 7.1.4 q6apm graph_callback null pointer dereference (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72258 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 ASoC denial of service (WID-SEC-2026-2852) VulDB Updates1 godzinę temuCVE-2026-72259 | Linux Kernel up to 6.6.144/6.12.96/6.18.39/7.1.4 ASoC/mediatek mt8192 of_reserved_mem_device_init allocation of resources (WID-SEC-2026-2852) Phoronix2 godziny temuLinux Overhauls Documentation For Reporting Kernel Security Bugs DEV Community3 godziny temuForgeOS Booted on a Real Server: Linux Kernel Below, Only Our Own Code Above VulDB Updates4 godziny temuCVE-2026-72239 | Linux Kernel sev x86/virt/sev/sev.c wbinvd_on_all_cpus state issue (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72240 | Linux Kernel up to 7.1.4 mfd sm501_register_device memory leak (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72241 | Linux Kernel up to 7.1.4 uleds strchr buffer overflow (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72244 | Linux Kernel up to 6.12.100/6.18.41/7.1.4/7.2-rc2 gpu-buddy allocation of resources (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72243 | Linux Kernel up to 7.2-rc2 selinux socket_sendmsg permission (Nessus ID 364200 / WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72245 | Linux Kernel up to 7.1.4 host1x host1x_device_parse_dt release of resource (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72246 | Linux Kernel flowtable input validation (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72247 | Linux Kernel up to 7.2-rc3 nf_conncount __nf_conncount_add dir comparison (WID-SEC-2026-2852) VulDB Updates4 godziny temuCVE-2026-72248 | Linux Kernel up to 7.1.4/7.2-rc2 flowtable nft_flow_dst_release buffer overflow (WID-SEC-2026-2852) LinuxAndUbuntu4 godziny temuLinux AutoFDO Benchmark: Clang Kernel Optimization
23 źródeł
CVE-2026-135540 | Mozilla Firefox up to 115.45/153.7/160 JIT memory corruption (Nessus ID 388625)
VulDB Updates 2 godziny temu
22 kolejnych źródeł
VulDB Updates2 godziny temuCVE-2026-135539 | Mozilla Firefox up to 115.45/153.7/160 CSS Object Model use after free (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135542 | Mozilla Firefox up to 115.45/153.7/160 Layout buffer overflow (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135541 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135544 | Mozilla Firefox up to 115.45/153.7/160 Navigation memory corruption (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135545 | Mozilla Firefox up to 153.7/160 Editor memory corruption (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135543 | Mozilla Firefox up to 115.45/153.7/160 Networking memory corruption (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135547 | Mozilla Firefox up to 115.45/153.7/160 Networking sandbox (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135549 | Mozilla Firefox up to 115.45/153.7/160 XSLT use after free (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135548 | Mozilla Firefox up to 115.45/153.7/160 Layout use after free (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135533 | Mozilla Firefox up to 115.45/153.7/160 Layout Tables off-by-one (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135536 | Mozilla Firefox up to 115.45/153.7/160 DOM Editor uninitialized pointer (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135535 | Mozilla Firefox up to 115.45/153.7/160 Skia input validation (Nessus ID 388625) VulDB Updates2 godziny temuCVE-2026-135537 | Mozilla Firefox up to 115.45/153.7/160 Layout Text/Fonts out-of-bounds (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135525 | Mozilla Firefox up to 115.45/153.7/160 WebRender use after free (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135526 | Mozilla Firefox up to 115.45/153.7/160 Networking use after free (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135527 | Mozilla Firefox up to 115.45/153.7/160 DOM/HTML use after free (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135528 | Mozilla Firefox up to 153.7/160 HTTP race condition (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135530 | Mozilla Firefox up to 115.45/153.7/160 HTTP sandbox (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135529 | Mozilla Firefox up to 153.7/160 Text sandbox (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135520 | Mozilla Firefox up to 115.45/153.7/160 CanvasWebGL sandbox (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135524 | Mozilla Firefox JavaScript Engine use after free (Nessus ID 388625) VulDB Updates3 godziny temuCVE-2026-135521 | Mozilla Firefox up to 115.45/153.7/160 Navigation sandbox (Nessus ID 388625)
Podobne wkłady
🔍 Verwandte News

Auch interessante Nachrichten JSON Schema in Dart

Thematisch verwandte Begriffe: JSON, Schema, Dart · 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...

Uwagi Komentarze są ładowane..
Rysunek do aktualizacji
Widżety i tematy
Ładowanie widżetów…
Następny wpis